Skip to content

Commit 0d001f2

Browse files
feat: compatibility with OTEL_SDK_DISABLED
1 parent db27403 commit 0d001f2

File tree

1 file changed

+2
-0
lines changed
  • instrumentation/puma/lib/opentelemetry/instrumentation/puma

1 file changed

+2
-0
lines changed

instrumentation/puma/lib/opentelemetry/instrumentation/puma/plugin.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ def register_puma_7_events(launcher)
3434
end
3535

3636
def shutdown_providers
37+
return if ENV['OTEL_SDK_DISABLED'] == 'true'
38+
3739
OpenTelemetry.tracer_provider.shutdown
3840
OpenTelemetry.meter_provider.shutdown if OpenTelemetry.respond_to?(:meter_provider)
3941
OpenTelemetry.logger_provider.shutdown if OpenTelemetry.respond_to?(:logger_provider)

0 commit comments

Comments
 (0)