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

fix: add workaround for OTEL_TRACES_EXPORTER logging an error message #783

Merged
merged 4 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ distribution of [OpenTelemetry JS](https://github.com/open-telemetry/opentelemet
It is licensed under the terms of the Apache Software License version 2.0. See [the
license file](./LICENSE) for more details.

>ℹ️  SignalFx was acquired by Splunk in October 2019. See [Splunk SignalFx](https://www.splunk.com/en_us/investor-relations/acquisitions/signalfx.html) for more information.
>ℹ️  SignalFx was acquired by Splunk in October 2019. See [Splunk SignalFx](https://www.splunk.com/en_us/about-splunk/acquisitions/signalfx.html) for more information.
9 changes: 8 additions & 1 deletion src/tracing/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,15 @@ export function startTracing(opts: StartTracingOptions = {}): boolean {
tracingContextManagerEnabled = true;
}

// tracer provider
// Workaround for https://github.com/open-telemetry/opentelemetry-js/issues/3422
const envTracesExporter = process.env.OTEL_TRACES_EXPORTER;
if (envTracesExporter !== undefined) {
process.env.OTEL_TRACES_EXPORTER = '';
}
const provider = new NodeTracerProvider(options.tracerConfig);
if (envTracesExporter !== undefined) {
process.env.OTEL_TRACES_EXPORTER = envTracesExporter;
}

configureInstrumentations(options);

Expand Down