Skip to content

feat(attribute): Add koa.type#472

Open
s1gr1d wants to merge 1 commit into
mainfrom
sig/attr-koa
Open

feat(attribute): Add koa.type#472
s1gr1d wants to merge 1 commit into
mainfrom
sig/attr-koa

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Jul 9, 2026

Copy link
Copy Markdown
Member

Description

Adds koa.type which is used in the koa instrumentation: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/packages/instrumentation-koa/src/enums/AttributeNames.ts

koa.name is not added as it can be substituted with either http.route (for routes) or code.function.name (for middleware).

PR Checklist

  • I have run yarn test and verified that the tests pass.
  • I have run yarn generate to generate and format code and docs.

If an attribute was added:

  • The attribute is in a namespace (e.g. nextjs.function_id, not function_id)
  • I have used the correct value for apply_scrubbing (i.e. manual or auto. Use never only for values that should never be scrubbed such as IDs)

If an attribute was deprecated:

@s1gr1d s1gr1d requested review from a team, Lms24, cleptric, mjq and nsdeschenes as code owners July 9, 2026 12:49
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Attributes

  • Add messaging attributes by s1gr1d in #469
  • Add url.same_origin (deprecated) and http.request.same_origin (replacement) attributes by Lms24 in #456
  • Add db.response.status_code by s1gr1d in #462

Other

  • (ai) Add granular cost attributes for cache and reasoning by vgrozdanic in #461
  • (attribute) Add koa.type by s1gr1d in #472

Internal Changes 🔧

  • (ci) Stop inheriting secrets for changelog-preview by tobias-wilfert in #463

🤖 This preview updates automatically when you update the PR.

@Lms24 Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding!

RE: koa.name: We can still add it to conventions and mark it as deprecated. Add _status: null to the deprecation since there's no direct replacement. In this case, the SDK will decide which attributes replace it in which case. The benefit is still that the attribute is documented and that it's gonna be deprecated (i.e. signaling conventions consumers that it shouldn't be set anymore). But feel free to tackle later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants