-
Notifications
You must be signed in to change notification settings - Fork 244
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
feat: sem_conv stability mode #1728
base: main
Are you sure you want to change the base?
Conversation
semantic_conventions/lib/opentelemetry/semantic_conventions/stability_mode.rb
Outdated
Show resolved
Hide resolved
semantic_conventions/lib/opentelemetry/semantic_conventions/stability_mode.rb
Outdated
Show resolved
Hide resolved
semantic_conventions/lib/opentelemetry/semantic_conventions/stability_mode.rb
Outdated
Show resolved
Hide resolved
semantic_conventions/lib/opentelemetry/semantic_conventions/stability_mode.rb
Outdated
Show resolved
Hide resolved
semantic_conventions/lib/opentelemetry/semantic_conventions/stability_mode.rb
Show resolved
Hide resolved
semantic_conventions/lib/opentelemetry/semantic_conventions/stability_mode.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Kayla Reopelle <[email protected]>
Link to instrumentation that uses this PR: open-telemetry/opentelemetry-ruby-contrib#1166 |
HTTP_DUP = 'http/dup' | ||
|
||
# These constants will be pulled in from elsehwere once semvconv stability PR merged | ||
# https://github.com/open-telemetry/opentelemetry-ruby/pull/1651 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there's a few stable attributes that aren't included in this PR. Why did you choose to use these attributes and not others?
https://opentelemetry.io/docs/specs/semconv/http/http-spans/#http-client
@lock.synchronize do | ||
opt_in = ENV.fetch('OTEL_SEMCONV_STABILITY_OPT_IN', nil) | ||
opt_in_list = opt_in.split(',').map(&:strip) if opt_in | ||
http_set_sability_mode(opt_in_list) if opt_in_list |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
http_set_sability_mode(opt_in_list) if opt_in_list | |
http_set_stability_mode(opt_in_list) if opt_in_list |
end | ||
end | ||
|
||
def http_set_sability_mode(opt_in_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def http_set_sability_mode(opt_in_list) | |
def http_set_stability_mode(opt_in_list) |
👋 This pull request has been marked as stale because it has been open with no activity. You can: comment on the issue or remove the stale label to hold stale off for a while, add the |
Lays the foundation for accepting a new environment variable,
OTEL_SEMCONV_STABILITY_OPT_IN
, which gives users the ability to determine which semantic conventions to use. Individual instrumentation are expected to add metrics/attributes by calling the methods present inOpenTelemetry::SemanticConventions::StabilityMode
. This borrows from Pythons implementation.Only HTTP is supported for now (spec) and the values defined so far are:
http
- emit the new, stable HTTP and networking conventions onlyhttp/dup
- emit both the old and the stable HTTP and networking conventionsdefault
- continue emitting whatever version of the old experimental HTTP and networking conventions the instrumentation was emitting previously.http/dup
has higher precedence thanhttp
in case both values are present