Class: OpenTelemetry::Instrumentation::AwsSdk::Instrumentation
- Inherits:
-
Base
- Object
- Base
- OpenTelemetry::Instrumentation::AwsSdk::Instrumentation
- Defined in:
- lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb
Overview
The OpenTelemetry::Instrumentation::AwsSdk::Instrumentation class contains
logic to detect and install the AwsSdk instrumentation.
Configuration keys and options
:inject_messaging_context
Allows adding of context key/value to Message Attributes for SQS/SNS messages.
false(default) - Context key/value will not be added.true- Context key/value will be added.
:enable_internal_instrumentation
Enables tracing of spans of internal span kind.
false(default) - Internal spans are not tracedtrue- Internal spans are traced.
:suppress_internal_instrumentation (deprecated)
This configuration has been deprecated in favor of :enable_internal_instrumentation
Constant Summary collapse
- MINIMUM_VERSION =
Gem::Version.new('2.0.0')
Instance Method Summary collapse
- #gem_version ⇒ Object
-
#semconv_mode ⇒ Symbol
Returns the semconv mode based on OTEL_SEMCONV_STABILITY_OPT_IN env var.
Instance Method Details
#gem_version ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb', line 60 def gem_version if Gem.loaded_specs['aws-sdk'] Gem.loaded_specs['aws-sdk'].version elsif Gem.loaded_specs['aws-sdk-core'] Gem.loaded_specs['aws-sdk-core'].version elsif defined?(::Aws::CORE_GEM_VERSION) Gem::Version.new(::Aws::CORE_GEM_VERSION) end end |
#semconv_mode ⇒ Symbol
Returns the semconv mode based on OTEL_SEMCONV_STABILITY_OPT_IN env var
72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/opentelemetry/instrumentation/aws_sdk/instrumentation.rb', line 72 def semconv_mode @semconv_mode ||= begin opt_in = ENV.fetch('OTEL_SEMCONV_STABILITY_OPT_IN', '') if opt_in.include?('database/dup') :dup elsif opt_in.include?('database') :stable else :old end end end |