allow just otel key to avoid spaces in env variables

This commit is contained in:
evanpelle
2025-09-11 19:48:02 -07:00
parent eec3b0e2bb
commit e26d164ef0
+3 -2
View File
@@ -24,8 +24,9 @@ if (config.otelEnabled()) {
console.log("OTEL enabled");
// Configure OpenTelemetry endpoint with basic auth (if provided)
const headers: Record<string, string> = {};
headers["Authorization"] = config.otelAuthHeader();
// Remove "Basic" prefix from the auth header for backwards compatibility
headers["Authorization"] =
`Basic ${config.otelAuthHeader().replace("Basic", "").trim()}`;
// Add OTLP exporter for logs
const logExporter = new OTLPLogExporter({
url: `${config.otelEndpoint()}/v1/logs`,