mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 15:24:55 +00:00
Refactor OpenTelemetry configuration
This commit is contained in:
parent
fb7fe8af1e
commit
30d9cbe9a3
@ -24,14 +24,18 @@ if (
|
||||
}
|
||||
}
|
||||
|
||||
const otlpEndpoint = process.env['OTEL_EXPORTER_OTLP_ENDPOINT'];
|
||||
|
||||
logger.info(otlpEndpoint);
|
||||
|
||||
sdk = new opentelemetry.NodeSDK({
|
||||
traceExporter: new OTLPTraceExporter({
|
||||
url: process.env['OTEL_EXPORTER_OTLP_ENDPOINT'],
|
||||
url: otlpEndpoint + '/v1/traces',
|
||||
headers: headers,
|
||||
}),
|
||||
metricReader: new PeriodicExportingMetricReader({
|
||||
exporter: new OTLPMetricExporter({
|
||||
url: process.env['OTEL_EXPORTER_OTLP_ENDPOINT'],
|
||||
url: otlpEndpoint + '/v1/metrics',
|
||||
headers: headers,
|
||||
}),
|
||||
}) as any,
|
||||
|
Loading…
Reference in New Issue
Block a user