Replies: 1 comment
-
as a current workaround, I'm avoiding this issue by including
|
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, thank you for creating such a great OSS!
but, I'm having a little trouble using this library.
In my application, I'm adding attributes to the root_span using
add_attributes
, and using those attributes to decide whether to generate a child_span or not like below. (using X-Ray)However, as shown below, when
OpenTelemetry::SDK::Trace::Tracer#internal_start_span
is called internally andrecording?
is false, aOpenTelemetry::Trace::Span
instance is generated instead of anOpenTelemetry::SDK::Trace::Span
.called
OpenTelemetry::SDK::Trace::Tracer#internal_start_span
opentelemetry-ruby/sdk/lib/opentelemetry/sdk/trace/tracer.rb
Line 37 in ad9a5c2
generate
OpenTelemetry::Trace::Span
instance whenrecording?
is falseopentelemetry-ruby/sdk/lib/opentelemetry/sdk/trace/tracer_provider.rb
Line 161 in ad9a5c2
This span does not have the
attributes
method and causes an error.This is because the generated span is an instance of
OpenTelemetry::Trace::Span
, which does not define the attributes method.This can cause problems when using a Sampler to sample the spans. Is there a way to handle this issue?
Should I avoid using a logic that checks the attributes of the root_span to determine whether to generate a child_span or not?
Personally, I feel a bit uneasy about
OpenTelemetry::SDK::Trace::Tracer#internal_start_span
generating anOpenTelemetry::Trace::Span
.Thank you for your help!
Beta Was this translation helpful? Give feedback.
All reactions