Skip to content

Commit

Permalink
fix(instrumentation-fastify): stop using fastify types in public api
Browse files Browse the repository at this point in the history
Prior to this commit, the Fastify instrumentation used to expose a few
types from the `fastify` lib directly.

Exposing these types leads to issues for TypeScript users who depend on
the integration but don't depend on `fastify` itself where their TypeScript
compilation would fail while complaining that it couldn't find any definitions
for `fastify`.

This scenario is pretty common when using the auto-instrumentation
packages.5

Signed-off-by: Boris Bera <[email protected]>
  • Loading branch information
dotboris committed Nov 3, 2022
1 parent ae76570 commit 863b62c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export class FastifyInstrumentation extends InstrumentationBase {
return fastify;
}

public _patchSend() {
private _patchSend() {
const instrumentation = this;
this._diag.debug('Patching fastify reply.send function');

Expand Down Expand Up @@ -238,7 +238,7 @@ export class FastifyInstrumentation extends InstrumentationBase {
};
}

public _hookPreHandler() {
private _hookPreHandler() {
const instrumentation = this;
this._diag.debug('Patching fastify preHandler function');

Expand Down

0 comments on commit 863b62c

Please sign in to comment.