mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-13 09:17:30 -05:00
honeycomb tracing
This commit is contained in:
22
backend/agents/honeycomb-tracing.js
Normal file
22
backend/agents/honeycomb-tracing.js
Normal file
@@ -0,0 +1,22 @@
|
||||
// tracing.js
|
||||
'use strict';
|
||||
|
||||
const { HoneycombSDK } = require('@honeycombio/opentelemetry-node');
|
||||
const {
|
||||
getNodeAutoInstrumentations,
|
||||
} = require('@opentelemetry/auto-instrumentations-node');
|
||||
|
||||
// uses the HONEYCOMB_API_KEY and OTEL_SERVICE_NAME environment variables
|
||||
const sdk = new HoneycombSDK({
|
||||
instrumentations: [
|
||||
getNodeAutoInstrumentations({
|
||||
// we recommend disabling fs autoinstrumentation since it can be noisy
|
||||
// and expensive during startup
|
||||
'@opentelemetry/instrumentation-fs': {
|
||||
enabled: false,
|
||||
},
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
sdk.start();
|
||||
Reference in New Issue
Block a user