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

fix: Use constant for service.name from semconv library #153

Merged
merged 1 commit into from
May 16, 2024

Conversation

pkanal
Copy link
Contributor

@pkanal pkanal commented May 16, 2024

Which problem is this PR solving?

While doing some bundle size analysis, noticed that the @opentelemetry/semantic-conventions library is a significant contributor to the bundle size because it has a lot of unminified constants. There was a PR merged that also exports each constant by itself instead of on an object which allows tree shaking to only import that constant instead of a whole object. This PR uses the new constants from the @opentelemetry/semantic-conventions instead of the deprecated SemanticConventions object.

Short description of the changes

  • Use exported constant for service name.

How to verify that this has the expected result

  • Smoke tests pass
  • Service name is still respected, run the example app locally and check that service name is set to the value expected.

@pkanal pkanal requested review from a team as code owners May 16, 2024 16:38
Copy link
Contributor

@MustafaHaddara MustafaHaddara left a comment

Choose a reason for hiding this comment

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

confirmed the new name lines up with the old name:

Screenshot 2024-05-16 at 12 30 57 PM Screenshot 2024-05-16 at 12 31 10 PM

@pkanal pkanal merged commit 7f294f4 into main May 16, 2024
9 checks passed
@pkanal pkanal deleted the purvi/semconv-const branch May 16, 2024 18:20
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.

None yet

2 participants