Skip to content

Commit a978a0f

Browse files
chore: Add call to ENV.fetch (rubocop offense) (#2188)
1 parent 657cede commit a978a0f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

exporter/otlp-http/lib/opentelemetry/exporter/otlp/http/trace_exporter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def prepare_headers(config_headers)
260260
end
261261

262262
def prepare_endpoint(endpoint)
263-
endpoint ||= ENV['OTEL_EXPORTER_OTLP_TRACES_ENDPOINT']
263+
endpoint ||= ENV.fetch('OTEL_EXPORTER_OTLP_TRACES_ENDPOINT', nil)
264264
if endpoint.nil?
265265
endpoint = ENV['OTEL_EXPORTER_OTLP_ENDPOINT'] || 'http://localhost:4318'
266266
endpoint += '/' unless endpoint.end_with?('/')

0 commit comments

Comments
 (0)