I'm attempting to export OTLP Traces to Dynatrace via the TRACELOOP_HEADERS environment variable that contains my API token.
I've tried setting the environment variable with TypeScript code, and the export command in bash/zsh, it didn't work either way.
Through my debugging, I found the OTLPTraceExporter that gets created by default doesn't use the value of the TRACELOOP_HEADERS at all, it uses the defaults which cause a 401 error and fails to export any traces
Error Message:
{"stack":"OTLPExporterError: Unauthorized\n at IncomingMessage.<anonymous> (/Users/aeric.walls/Offline/Code/test-llm/node_modules/@opentelemetry/otlp-exporter-base/src/platform/node/util.ts:131:27)\n at IncomingMessage.emit (node:events:531:35)\n at IncomingMessage.emit (node:domain:488:12)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","message":"Unauthorized","name":"OTLPExporterError","data":"\b\u0010\u0012GAuthorization header contains unsupported authorization scheme 'Bearer'","code":"401"}
Is there some other setup I'm missing? To my understanding I just need the base URL and headers set as environment variables, then during traceloop.initialize(), it would create an OTLPTraceExporter with my URL and Headers.
I'm attempting to export OTLP Traces to Dynatrace via the TRACELOOP_HEADERS environment variable that contains my API token.
I've tried setting the environment variable with TypeScript code, and the export command in bash/zsh, it didn't work either way.
Through my debugging, I found the OTLPTraceExporter that gets created by default doesn't use the value of the TRACELOOP_HEADERS at all, it uses the defaults which cause a 401 error and fails to export any traces
Error Message:
{"stack":"OTLPExporterError: Unauthorized\n at IncomingMessage.<anonymous> (/Users/aeric.walls/Offline/Code/test-llm/node_modules/@opentelemetry/otlp-exporter-base/src/platform/node/util.ts:131:27)\n at IncomingMessage.emit (node:events:531:35)\n at IncomingMessage.emit (node:domain:488:12)\n at endReadableNT (node:internal/streams/readable:1696:12)\n at processTicksAndRejections (node:internal/process/task_queues:82:21)","message":"Unauthorized","name":"OTLPExporterError","data":"\b\u0010\u0012GAuthorization header contains unsupported authorization scheme 'Bearer'","code":"401"}
OTLPTraceExporter during execution:
Environment Variable
TRACELOOP_HEADERS=Authorization=Api-Token%20d<Dynatrace-API-Token-Here>
Is there some other setup I'm missing? To my understanding I just need the base URL and headers set as environment variables, then during traceloop.initialize(), it would create an OTLPTraceExporter with my URL and Headers.