-
Notifications
You must be signed in to change notification settings - Fork 691
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
opentelemetry-sdk: use release candidate code attributes #4508
base: main
Are you sure you want to change the base?
Conversation
Instead of using the deprecated use latest release candidate code attributes. While at it stop using SpanAttributes.
@@ -17,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
([#4494](https://github.com/open-telemetry/opentelemetry-python/pull/4494)) | |||
- Improve CI by cancelling stale runs and setting timeouts | |||
([#4498](https://github.com/open-telemetry/opentelemetry-python/pull/4498)) | |||
- opentelemetry-sdk: use release candidate code attributes |
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.
- opentelemetry-sdk: use release candidate code attributes | |
- opentelemetry-sdk: use release candidate code attributes: `code.function` -> `code.function.name`, `code.lineno` -> `code.line.number`, `code.filepath` -> `code.file.path` |
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.
Since code semconv is in Release Candidate
status, I'm good with the change.
https://opentelemetry.io/docs/specs/semconv/code/
Existing code instrumentations that are using v1.29.0 of code conventions (or prior):
SHOULD NOT change the version of the code conventions that they emit by default until the code semantic conventions are marked stable.
if value is not None and value.args: | ||
attributes[SpanAttributes.EXCEPTION_MESSAGE] = str( | ||
attributes[exception_attributes.EXCEPTION_MESSAGE] = str( | ||
value.args[0] | ||
) | ||
if tb is not None: | ||
# https://github.com/open-telemetry/opentelemetry-specification/blob/9fa7c656b26647b27e485a6af7e38dc716eba98a/specification/trace/semantic_conventions/exceptions.md#stacktrace-representation |
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.
While we are still here, can you change the URL to point to the main one?
Description
Instead of using the deprecated use latest release candidate code attributes.
While at it stop using SpanAttributes.
This is similar to what the go sdk is doing open-telemetry/opentelemetry-go-contrib#6870
Refs #4316
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Contrib Repo Change?
Checklist: