mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 16:57:39 -05:00
more instrumentation
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
const opentelemetry = require('@opentelemetry/sdk-node');
|
||||
const { MongoDBInstrumentation } = require('@opentelemetry/instrumentation-mongodb');
|
||||
|
||||
const {SocketIoInstrumentation} = require("@opentelemetry/instrumentation-socket.io");
|
||||
const { MongooseInstrumentation } = require('@opentelemetry/instrumentation-mongoose');
|
||||
const { TraceIdRatioBasedSampler } = require('@opentelemetry/sdk-trace-node');
|
||||
const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http');
|
||||
const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node');
|
||||
@@ -26,6 +27,8 @@ const sdk = new opentelemetry.NodeSDK({
|
||||
traceExporter: new OTLPTraceExporter(),
|
||||
sampler: new TraceIdRatioBasedSampler(samplePercentage),
|
||||
instrumentations: [
|
||||
new SocketIoInstrumentation(),
|
||||
new MongooseInstrumentation(),
|
||||
new MongoDBInstrumentation({
|
||||
// see under for available configuration
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user