-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to add tags to spans #312
Comments
👋 @genebean. In OpenTelemetry tags are referred to as attributes. There is a Let us know if you still have questions. |
When configuring ddtrace I can do this: Datadog.configure do |c|
c.tracer tags: {
'service_name' => 'my-application-name',
'service.version' => version,
}
end This gem currently limits me to doing this: OpenTelemetry::SDK.configure do |c|
c.add_span_processor(
OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(
OpenTelemetry::Exporters::Jaeger::Exporter.new(
service_name: 'my-application-name', host: jaeger_host, port: 6831
)
)
)
end The key difference here is that the only tag / attribute I can set at startup is |
The correct place to do this is with a OpenTelemetry::SDK.configure do |c|
c.resource = OpenTelemetry::SDK::Resources::Resource.create({
'service_name' => 'my-application-name',
'service.version' => version,
})
end Unfortunately, we haven't yet implemented the mapping from OTel's opentelemetry-ruby/exporters/jaeger/lib/opentelemetry/exporters/jaeger/exporter.rb Lines 125 to 133 in 7a10db9
#314 discusses how we might do this. We don't have consensus yet. |
As best as I can tell from reading through things, there doesn't seem to be a way for me to add tags yet. My specific use case here is adding tags to an app instrumented via the
opentelemetry-ruby/instrumentation/sinatra/
.The text was updated successfully, but these errors were encountered: