Effect CommunityEC
Effect Community2y ago
15 replies
attila

Registering Instrumentations with `@effect/opentelemetry`'s `NodeSDK`

Is it possible to register instrumentation with the @effect/opentelemetry's NodeSDK? I'm thinking of stuff like @opentelemetry/auto-instrumentations-node: https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node
const { registerInstrumentations } = require('@opentelemetry/instrumentation');

registerInstrumentations({
  instrumentations: [
    getNodeAutoInstrumentations({
      // load custom configuration for http instrumentation
      '@opentelemetry/instrumentation-http': {
        applyCustomAttributesOnSpan: (span) => {
          span.setAttribute('foo2', 'bar2');
        },
      },
    }),
  ],
});
Was this page helpful?