mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Add OpenTelemetry HTTP and Express instrumentations
This commit is contained in:
@@ -3,6 +3,8 @@ import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentation
|
||||
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-proto';
|
||||
import { OTLPMetricExporter } from '@opentelemetry/exporter-metrics-otlp-proto';
|
||||
import { PeriodicExportingMetricReader } from '@opentelemetry/sdk-metrics';
|
||||
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
|
||||
import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express';
|
||||
import logger from './Logger';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
|
||||
@@ -39,7 +41,7 @@ if (
|
||||
headers: headers,
|
||||
}),
|
||||
}) as any,
|
||||
instrumentations: [getNodeAutoInstrumentations()],
|
||||
instrumentations: [getNodeAutoInstrumentations(), new HttpInstrumentation(), new ExpressInstrumentation()],
|
||||
});
|
||||
|
||||
sdk.start();
|
||||
|
||||
@@ -25,9 +25,9 @@ exporters:
|
||||
authenticator: headers_setter
|
||||
|
||||
service:
|
||||
telemetry:
|
||||
logs:
|
||||
level: "debug"
|
||||
# telemetry:
|
||||
# logs:
|
||||
# level: "debug"
|
||||
extensions: [ headers_setter ]
|
||||
pipelines:
|
||||
traces:
|
||||
|
||||
Reference in New Issue
Block a user