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] move to SDK 2.x #6441

Merged

Conversation

pichlermarc
Copy link
Member

@pichlermarc pichlermarc commented Feb 28, 2025

This PR updates the docs to the latest 2.0.0/0.200.0 release of the OTel JS SDK.

Closes #6396
Refs open-telemetry/opentelemetry-js#5362
Refs open-telemetry/opentelemetry-js#5148

Notable changes in the docs:

  • TypeScript support policy changes from not defined, to DefinetlyTyped's policy, which sets a support window of 2 years, and the drop of support for old versions in minor releases.
  • new Resource({...}) -> resourceFromAttributes({...}
  • Resource.empty() -> emtpyResource()
  • Resource.default() -> defaultResource()
  • new View({...}) has been replaced by just {...}
    • aggregation stops using the Aggregation class and extensions of it, it has been replaced by a type AggregationOption that looks like this:
      • {type: AggregationType.EXPLICIT_BUCKET_HISTOGRAM, options: {...}}

Preview: https://deploy-preview-6441--opentelemetry.netlify.app/docs/languages/js/

@pichlermarc pichlermarc force-pushed the feat/update-js-sdk-to-2.x branch from f69693e to 947200b Compare February 28, 2025 10:59
@pichlermarc pichlermarc marked this pull request as ready for review February 28, 2025 11:07
@pichlermarc pichlermarc requested a review from a team as a code owner February 28, 2025 11:07
@@ -271,13 +271,12 @@ Add the following to your `package.json`:
"@google-cloud/functions-framework": "^3.0.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/auto-instrumentations-node": "^0.56.1",
"@opentelemetry/exporter-trace-otlp-http": "^0.57.2",
"@opentelemetry/instrumentation": "^0.57.2",
"@opentelemetry/sdk-node": "^0.57.2",
Copy link
Member Author

Choose a reason for hiding this comment

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

Note for reviewers: this dependency was removed on purpose - it is not used in the above code so it can be safely dropped, which will reduce install size 🙂

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like the duplication of information that exists in this page and https://github.com/open-telemetry/opentelemetry-js?tab=readme-ov-file#supported-runtimes. We should address this at some point (not in the scope of this PR).

@pichlermarc
Copy link
Member Author

@chalin @tiffany76 2.0.0/0.200.0 is live - this is now unblocked 🙂

Thank you all for your help! 🙌

@tiffany76 tiffany76 added this pull request to the merge queue Mar 17, 2025
@tiffany76
Copy link
Contributor

Thanks, @pichlermarc!

Merged via the queue into open-telemetry:main with commit 546f3e8 Mar 17, 2025
18 checks passed
@pichlermarc pichlermarc deleted the feat/update-js-sdk-to-2.x branch March 17, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Prepare documentation update for OTel JS SDK 2.0
3 participants