Skip to content

Conversation

abdussamadbello
Copy link

This pull request adds support for setting OpenTelemetry resource attributes in the browser SDK, allowing users to specify custom key/value pairs (such as service version or deployment environment) that are attached as global attributes. The changes include updates to the SDK configuration, documentation, and initialization logic.

OpenTelemetry resource attributes support:

  • Added an optional otelResourceAttributes array to the BrowserSDKConfig type in index.ts, allowing users to specify key/value pairs for OpenTelemetry resource attributes.
  • Updated the Browser class constructor to accept and process the otelResourceAttributes option, converting the array to an object and setting them as global attributes during initialization. [1] [2]

Documentation updates:

  • Updated the usage example in README.md to demonstrate how to use the new otelResourceAttributes option in HyperDX.init.
  • Added documentation for the otelResourceAttributes option, including a code example, to the configuration options list in README.md.

Copy link

changeset-bot bot commented Oct 9, 2025

🦋 Changeset detected

Latest commit: 5b55e15

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@hyperdx/browser Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

2 participants