Skip to content

Commit fc6f51f

Browse files
committed
Update types of fastifyOtelInstrumentationInstance
1 parent 5a95504 commit fc6f51f

File tree

1 file changed

+3
-2
lines changed
  • packages/node/src/integrations/tracing/fastify

1 file changed

+3
-2
lines changed

packages/node/src/integrations/tracing/fastify/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { generateInstrumentOnce } from '../../../otel/instrument';
1515
import { FastifyInstrumentationV3 } from './v3/instrumentation';
1616
import * as diagnosticsChannel from 'node:diagnostics_channel';
1717
import { DEBUG_BUILD } from '../../../debug-build';
18+
import type { Instrumentation, InstrumentationConfig } from '@opentelemetry/instrumentation';
1819

1920
interface FastifyHandlerOptions {
2021
/**
@@ -77,8 +78,8 @@ export const instrumentFastify = generateInstrumentOnce(INTEGRATION_NAME, () =>
7778
});
7879
});
7980

80-
// Returning this as any not to deal with the internal types of the FastifyOtelInstrumentation
81-
return fastifyOtelInstrumentationInstance as any;
81+
// Returning this as unknown not to deal with the internal types of the FastifyOtelInstrumentation
82+
return fastifyOtelInstrumentationInstance as Instrumentation<InstrumentationConfig>;
8283
});
8384

8485
const _fastifyIntegration = (() => {

0 commit comments

Comments
 (0)