File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,12 +26,14 @@ import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express'
2626import { HttpInstrumentation } from '@opentelemetry/instrumentation-http'
2727import { UndiciInstrumentation } from '@opentelemetry/instrumentation-undici'
2828import { NodeSDK } from '@opentelemetry/sdk-node'
29+ import { diag , DiagConsoleLogger , DiagLogLevel } from '@opentelemetry/api'
2930
30- // For tracing diagnostics, uncomment these lines:
31- // import { diag, DiagConsoleLogger, DiagLogLevel } from '@opentelemetry/api'
32- // diag.setLogger(new DiagConsoleLogger(), DiagLogLevel.DEBUG)
33-
31+ // TEMPORARY: enable OTel diagnostic logging to investigate why traces aren't
32+ // arriving in the collector. See github/docs-engineering#6046. Revert once
33+ // the export pipeline is confirmed working.
3434if ( process . env . OTEL_EXPORTER_OTLP_TRACES_ENDPOINT ) {
35+ diag . setLogger ( new DiagConsoleLogger ( ) , DiagLogLevel . INFO )
36+
3537 const sdk = new NodeSDK ( {
3638 serviceName : process . env . OTEL_SERVICE_NAME || 'docs-internal' ,
3739 traceExporter : new OTLPTraceExporter ( { } ) ,
You can’t perform that action at this time.
0 commit comments