Skip to content
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(otel): Upgrade @opentelemetry/semantic-conventions to 1.26.0 #13631

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Sep 9, 2024

resolves #13627

In 1.26.0 otel-js has updated the deprecations for the attributes based on the new changes to semantic conventions.

They also changed the name of some exports, for example: SEMATTRS_HTTP_ROUTE -> ATTR_HTTP_ROUTE. Some exports names were not able to be changed because they are imported from a subpath export @opentelemetry/semantic-conventions/incubating. This subpath breaks some bundling setups, so we are unable to use it.

@AbhiPrasad AbhiPrasad requested review from timfish, mydea and a team September 9, 2024 11:50
@AbhiPrasad AbhiPrasad self-assigned this Sep 9, 2024
@AbhiPrasad AbhiPrasad requested review from stephanie-anderson and removed request for a team September 9, 2024 11:50
SEMANTIC_ATTRIBUTE_SENTRY_OP,
SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,
SEMANTIC_ATTRIBUTE_URL_FULL,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't totally remove SEMANTIC_ATTRIBUTE_URL_FULL from core export because non-otel SDKs also use it, but maybe we should just hardcode the string?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no strong opinions either way!

@AbhiPrasad AbhiPrasad force-pushed the abhi-bump-otel-conventions-1.26.0 branch from 7885d49 to c74742c Compare September 9, 2024 12:54
ATTR_HTTP_METHOD,
ATTR_HTTP_REQUEST_METHOD,
ATTR_HTTP_TARGET,
} from '@opentelemetry/semantic-conventions/incubating';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little nervous about adding these subpath imports here.

Will this break bundling?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't. Is this in their package exports? Do the cjs tests pass for older node versions?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah so this seems to break the jest tests hmm. Let me dig into why this is.

In 1.26.0 otel-js has updated the deprecations for the attributes based
on the new changes to semantic conventions.

They also changed the name of some exports, for example:
`SEMATTRS_HTTP_ROUTE` -> `ATTR_HTTP_ROUTE`. Some exports names were not
able to be changed because they are imported from a subpath export
@opentelemetry/semantic-conventions/incubating. This subpath breaks some
bundling setups, so we are unable to use it.
@AbhiPrasad AbhiPrasad force-pushed the abhi-bump-otel-conventions-1.26.0 branch from c74742c to 899e6e6 Compare September 10, 2024 09:04
@AbhiPrasad
Copy link
Member Author

I ended up changing this PR to remove the subpath exports.

The change is less crazy now, so I'll merge in after CI passes.

Copy link
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 22.52 KB - -
@sentry/browser - with treeshaking flags 21.3 KB - -
@sentry/browser (incl. Tracing) 34.78 KB - -
@sentry/browser (incl. Tracing, Replay) 71.23 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 61.67 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 75.58 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 88.3 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 90.14 KB - -
@sentry/browser (incl. metrics) 26.83 KB - -
@sentry/browser (incl. Feedback) 39.6 KB - -
@sentry/browser (incl. sendFeedback) 27.19 KB - -
@sentry/browser (incl. FeedbackAsync) 31.9 KB - -
@sentry/react 25.28 KB - -
@sentry/react (incl. Tracing) 37.75 KB - -
@sentry/vue 26.72 KB - -
@sentry/vue (incl. Tracing) 36.67 KB - -
@sentry/svelte 22.65 KB - -
CDN Bundle 23.77 KB - -
CDN Bundle (incl. Tracing) 36.5 KB - -
CDN Bundle (incl. Tracing, Replay) 70.91 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 76.22 KB - -
CDN Bundle - uncompressed 69.63 KB - -
CDN Bundle (incl. Tracing) - uncompressed 108.25 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 219.91 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 233.11 KB - -
@sentry/nextjs (client) 37.51 KB - -
@sentry/sveltekit (client) 35.36 KB - -
@sentry/node 121.18 KB -1.26% -1.54 KB 🔽
@sentry/node - without tracing 94.55 KB -1.74% -1.67 KB 🔽
@sentry/aws-serverless 104.23 KB -1.43% -1.5 KB 🔽

View base workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update OTEL semantic conventions to 1.26.0
2 participants