Skip to content

Conversation

@pcga11
Copy link

@pcga11 pcga11 commented Dec 11, 2025

Currently, the HyperDX Node SDK reads the OTLP endpoint exclusively from environment variables (OTEL_EXPORTER_OTLP_ENDPOINT). This works well for simple setups, but becomes problematic when running multiple OTEL collectors in the same environment.

In my team's case, we use multiple OTEL collectors and need to send telemetry from HyperDX to a different endpoint than our other instrumentation. Since OTEL_EXPORTER_OTLP_ENDPOINT is already in use, and the SDK defaults to https://in-otel.hyperdx.io when not set, there's no way to programmatically override the endpoint.
Solution

So, I've added an optional endpoint config option to init() / initSDK():

HyperDX.init({service: 'my-app', apiKey: process.env.HYPERDX_API_KEY, url: 'http://my-otel-collector:4318',});

Gives users explicit control over where telemetry is sent.

@changeset-bot
Copy link

changeset-bot bot commented Dec 11, 2025

⚠️ No Changeset found

Latest commit: d5b536c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a 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.

1 participant