config.sampler = OpenTelemetry::SDK::Trace::Samplers::TraceIdRatioBased.new(0.1) - not wokring #1796
Unanswered
akshaysn1991
asked this question in
Q&A
Replies: 1 comment
-
The configurator DSL does not support setting a sampler. It is a parameter of the TracerProvider constructor. I'd recommend configuring these using the standard environment variables OTEL_TRACES_SAMPLER and OTEL_TRACES_SAMPLER_ARG |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not able to configure sampling in OpenTelemetry::SDK.configure
getting below error
E, [2025-01-02T13:50:08.053572 #14135] ERROR -- : OpenTelemetry error: unexpected configuration error due to undefined method `sampler=' for #OpenTelemetry::SDK::Configurator:0x00007f990fd69fc0 - OpenTelemetry::SDK::ConfigurationError
Share details about your runtime
Operating system details: Mac 12
RUBY_ENGINE: "ruby"
RUBY_VERSION: "2.5.2"
gem 'opentelemetry-sdk', '
> 1.1.0'> 0.20.3'gem 'opentelemetry-exporter-otlp', '
gem 'opentelemetry-instrumentation-all', '~> 0.24.0'
gem 'opentelemetry-exporter-zipkin'
require 'opentelemetry/sdk'
OpenTelemetry::SDK.configure do |config|
config.sampler = OpenTelemetry::SDK::Trace::Samplers::TraceIdRatioBased.new(0.1)
config.use 'OpenTelemetry::Instrumentation::Rails'
end
Beta Was this translation helpful? Give feedback.
All reactions