Set name of middleware function to improve interop with monitoring tools.
Tools like @opentelemetry/instrumentation-koa use function names to generate span names. These names appear in UI of monitoring tools, such as datadog.
Because the returned function doesn't have a name, there's no hint about the actual middleware associated with that span. See below:
Set name of middleware function to improve interop with monitoring tools.
Tools like @opentelemetry/instrumentation-koa use function names to generate span names. These names appear in UI of monitoring tools, such as datadog.
Because the returned function doesn't have a name, there's no hint about the actual middleware associated with that span. See below:
In v4 the returned middleware had a name but in v5 got removed, see: https://github.com/koajs/bodyparser/blob/5678a79e64d7833e0dd7734c9e9de40126e14d98/index.js#L63.
Checklist