-
Notifications
You must be signed in to change notification settings - Fork 346
feat: allow disabling otel exporter #1436
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
base: main
Are you sure you want to change the base?
feat: allow disabling otel exporter #1436
Conversation
🦋 Changeset detectedLatest commit: 36d4dd0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
@Misfits09 is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
b8cf975 to
60f179a
Compare
60f179a to
36d4dd0
Compare
| exporterEnabled: HDX_EXPORTER_ENABLED, | ||
| apiKey: HDX_API_KEY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d suggest removing the apiKey when HDX_EXPORTER_ENABLED is true. In this way users don’t need to inject an env var on the frontend side and rebuild the image
| ARG OTEL_EXPORTER_ENABLED | ||
| ARG OTEL_SERVICE_NAME | ||
| ARG IS_LOCAL_MODE | ||
| ENV NEXT_PUBLIC_OTEL_EXPORTER_OTLP_ENDPOINT $OTEL_EXPORTER_OTLP_ENDPOINT | ||
| ENV NEXT_PUBLIC_OTEL_EXPORTER_ENABLED $OTEL_EXPORTER_ENABLED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No changes are needed here if the env var is only available on the next api side
|
@Misfits09 Lmk if comments make sense. Would love to get this PR out |
Context
The default behavior to try to export logs/metrics/traces to an otel collector is causing issues in cases where this collector is not publicly accessible. Therefore adding an option to disable it would avoid having many errors in the Network tabs of the browser.
It has been briefly discussed here on discord
Changes
Added a new
HDX_EXPORTER_ENABLEDconfiguration variable that prevents the instanciation ofHyperDX.init()from@hyperdx/browser. Which disables sending metrics to the collector