61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
|
# File 'lib/datadog/opentelemetry/configuration/settings.rb', line 61
def self.add_settings!(base)
base.class_eval do
settings :opentelemetry do
settings :exporter do
option :protocol do |o|
o.type :string
o.setter(&Settings.normalize_protocol("OTEL_EXPORTER_OTLP_PROTOCOL"))
o.env "OTEL_EXPORTER_OTLP_PROTOCOL"
o.default "http/protobuf"
end
option :timeout_millis do |o|
o.type :int
o.env "OTEL_EXPORTER_OTLP_TIMEOUT"
o.default 10_000
end
option :headers do |o|
o.skip_telemetry true
o.type :hash
o.env "OTEL_EXPORTER_OTLP_HEADERS"
o.default { {} }
o.env_parser(&Settings.("OTEL_EXPORTER_OTLP_HEADERS"))
end
option :endpoint do |o|
o.type :string, nilable: true
o.env "OTEL_EXPORTER_OTLP_ENDPOINT"
o.default nil
end
end
settings :metrics do
option :enabled do |o|
o.type :bool
o.env "DD_METRICS_OTEL_ENABLED"
o.default false
end
option :exporter do |o|
o.type :string
o.env "OTEL_METRICS_EXPORTER"
o.default "otlp"
end
option :export_interval_millis do |o|
o.type :int
o.env "OTEL_METRIC_EXPORT_INTERVAL"
o.default 10_000
end
option :export_timeout_millis do |o|
o.type :int
o.env "OTEL_METRIC_EXPORT_TIMEOUT"
o.default 7_500
end
option :temporality_preference do |o|
o.type :string
o.env "OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"
o.default "delta"
o.setter(&Settings.normalize_temporality_preference("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE"))
end
option :endpoint do |o|
o.type :string, nilable: true
o.env "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT"
o.default nil
end
option :headers do |o|
o.skip_telemetry true
o.type :hash, nilable: true
o.env "OTEL_EXPORTER_OTLP_METRICS_HEADERS"
o.default nil
o.env_parser(&Settings.("OTEL_EXPORTER_OTLP_METRICS_HEADERS"))
end
option :timeout_millis do |o|
o.type :int, nilable: true
o.env "OTEL_EXPORTER_OTLP_METRICS_TIMEOUT"
o.default 10000
end
option :protocol do |o|
o.type :string, nilable: true
o.env "OTEL_EXPORTER_OTLP_METRICS_PROTOCOL"
o.default "http/protobuf"
o.setter(&Settings.normalize_protocol("OTEL_EXPORTER_OTLP_METRICS_PROTOCOL"))
end
end
settings :logs do
option :enabled do |o|
o.type :bool
o.env "DD_LOGS_OTEL_ENABLED"
o.default false
end
option :exporter do |o|
o.type :string
o.env "OTEL_LOGS_EXPORTER"
o.default "otlp"
end
option :endpoint do |o|
o.type :string, nilable: true
o.env "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT"
o.default nil
end
option :headers do |o|
o.skip_telemetry true
o.type :hash, nilable: true
o.env "OTEL_EXPORTER_OTLP_LOGS_HEADERS"
o.default nil
o.env_parser(&Settings.("OTEL_EXPORTER_OTLP_LOGS_HEADERS"))
end
option :timeout_millis do |o|
o.type :int, nilable: true
o.env "OTEL_EXPORTER_OTLP_LOGS_TIMEOUT"
o.default 10_000
end
option :protocol do |o|
o.type :string, nilable: true
o.env "OTEL_EXPORTER_OTLP_LOGS_PROTOCOL"
o.default "http/protobuf"
o.setter(&Settings.normalize_protocol("OTEL_EXPORTER_OTLP_LOGS_PROTOCOL"))
end
option :max_queue_size do |o|
o.type :int
o.env "OTEL_BLRP_MAX_QUEUE_SIZE"
o.default 2048
end
option :schedule_delay_millis do |o|
o.type :int
o.env "OTEL_BLRP_SCHEDULE_DELAY"
o.default 1000
end
option :export_timeout_millis do |o|
o.type :int
o.env "OTEL_BLRP_EXPORT_TIMEOUT"
o.default 30_000
end
option :max_export_batch_size do |o|
o.type :int
o.env "OTEL_BLRP_MAX_EXPORT_BATCH_SIZE"
o.default 512
end
end
end
end
end
|