Skip to content

ignoreIncomingRequestHook support for @opentelemetry/instrumentation-fastify #2944

@kibertoad

Description

@kibertoad

Is your feature request related to a problem? Please describe

It is frequently desireable to skip certain endpoints from instrumentation (e. g. metrics and healthchecks). It is not currently possible to do so when using fastify autoinstrumentation.

Describe the solution you'd like to see

Same API that HTTP instrumentation uses would work:

    /** Not trace all incoming requests that matched with custom function */
    ignoreIncomingRequestHook?: IgnoreIncomingRequestFunction;

Describe alternatives you've considered

It is possible to make this work by adding manual instrumentation to fastify endpoints, but it's not a great DX.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions