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

[javascript] discontinue use of deprecated APIs #6416

Merged

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Feb 25, 2025

Hi all - this PR contains updates to documentation discontinuing the use of deprecated APIs. As discussed in #6396 this is in preparation of the upcoming SDK 2.0.0 release, but uses only features that are available in the currently latest release 1.30.1/0.57.2 for now.

I will follow up with 2 other PRs for

Notable changes:

  • BasicTracerProvider#register() will be removed to allow for better tree-shaking
    • this was replaced in the docs by manually registering the propagator that would've been registered by BasicTracerProvider#register()
    • NodeTracerProvider#register() is still available in 2.0, therefore docs using it remain unchanged
    • WebTracerProvider#register() is still available in 2.0, therefore docs using it remain unchanged
  • *TracerProvider#addSpanProcessor() was replaced by a spanProcessors constructor option, which is available since 1.28.0
    • changing this required some re-ordering in the docs as exporters used to be instantiated later
  • I updated dependencies in the serverless docs to ensure that all of these features are available.

Refs #6396

@pichlermarc pichlermarc force-pushed the feat/stop-using-deprecated branch from 32993f6 to ae862b7 Compare February 25, 2025 13:51
@pichlermarc pichlermarc marked this pull request as ready for review February 25, 2025 15:26
@pichlermarc pichlermarc requested a review from a team as a code owner February 25, 2025 15:26
Copy link
Contributor

@tiffany76 tiffany76 left a comment

Choose a reason for hiding this comment

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

LGTM from a copy edit perspective. Let's get another set of eyes on this from @open-telemetry/javascript-approvers. Thanks!

Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

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

RSLGTM

@@ -178,10 +178,9 @@ const FrontendTracer = async () => {
resource: new Resource({
[SEMRESATTRS_SERVICE_NAME]: process.env.NEXT_PUBLIC_OTEL_SERVICE_NAME,
}),
spanProcessors: [new SimpleSpanProcessor(new OTLPTraceExporter())],
Copy link
Member

Choose a reason for hiding this comment

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

This file should be the snippet of FrontendTracer.ts.
But it seems it is already out-of-date, so I won't block this PR.

I've created the issue open-telemetry/opentelemetry-demo#2080 to follow-up on the Demo repo.

@chalin chalin added the sig-approval-missing Co-owning SIG didn't provide an approval label Feb 26, 2025
Copy link
Contributor

@chalin chalin left a comment

Choose a reason for hiding this comment

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

@pichlermarc - so this is gating on open-telemetry/opentelemetry-js#5148? I'm going to mark this as blocked and "request changes" to ensure that this doesn't get merged ahead of time by mistake.

@chalin chalin added the blocked label Feb 26, 2025
@tiffany76
Copy link
Contributor

I think the two API PRs can be merged once they're approved based on the tracking issue. So I don't think they need to be blocked. But @pichlermarc can confirm.

removing use of deprecated APIs (can be merged immediately as the replacements for these are already present in the latest release)

@pichlermarc
Copy link
Member Author

@pichlermarc - so this is gating on open-telemetry/opentelemetry-js#5148? I'm going to mark this as blocked and "request changes" to ensure that this doesn't get merged ahead of time by mistake.

Thanks for double-checking. 🙂 open-telemetry/opentelemetry-js#5148 is not required before this PRcan be merged. All the features used here are available in the latest 1.x version of the SDK.

After this PR, I will follow up with another one that will actually lift the docs to 2.0 (that one will then be blocked by open-telemetry/opentelemetry-js#5148) 🙂

@trentm trentm removed the sig-approval-missing Co-owning SIG didn't provide an approval label Feb 26, 2025
@tiffany76 tiffany76 removed the blocked label Feb 27, 2025
@tiffany76 tiffany76 added this pull request to the merge queue Feb 27, 2025
Merged via the queue into open-telemetry:main with commit fe3598a Feb 27, 2025
18 checks passed
@pichlermarc pichlermarc deleted the feat/stop-using-deprecated branch February 28, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants