Skip to content

feat(instrumentation-koa): Add support for koa 3 #2957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tlindhardt
Copy link

Which problem is this PR solving?

  • During the upgrade of our project from v2 to v3 I noticed that the span name was not correct and the attributes were missing. Upon further inspection I found that the instrumentation was being skipped entirely.

Short description of the changes

  • Switched to ATTR_HTTP_ROUTE from SEMATTRS_HTTP_ROUTE
  • Add support to instrumentation-koa for koa v3
  • Updated tests
    • This includes removing a test to validate the generator middleware is skipped as that is no longer supported and mentioned in the upgrade guide

@tlindhardt tlindhardt requested a review from a team as a code owner July 23, 2025 21:21
Copy link

linux-foundation-easycla bot commented Jul 23, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: tlindhardt / name: Tyson Lindhardt (bdcd88a)

@github-actions github-actions bot added pkg:instrumentation-koa pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found. labels Jul 23, 2025
@tlindhardt tlindhardt force-pushed the feat/instrumentation-koa/koa3-support branch from b499b4b to bdcd88a Compare July 23, 2025 21:33
@tlindhardt
Copy link
Author

I wasn't sure of the release process and if I needed to also change the manifest file or not.

Copy link
Contributor

This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature.
Are you familiar with this package? Consider becoming a component owner.

@@ -502,35 +497,6 @@ describe('Koa Instrumentation', function () {
);
});

it('should not instrument generator middleware functions', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this test no longer necessary?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

support for generator functions have been removed in v3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:instrumentation-koa pkg-status:unmaintained:autoclose-scheduled pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants