Skip to content

feat!: only emit stable http, network and database attributes - #3585

Merged
trentm merged 20 commits into
open-telemetry:mainfrom
maryliag:stable-http
Jul 3, 2026
Merged

feat!: only emit stable http, network and database attributes#3585
trentm merged 20 commits into
open-telemetry:mainfrom
maryliag:stable-http

Conversation

@maryliag

Copy link
Copy Markdown
Member

Part Of open-telemetry/opentelemetry-js#6240

  • Only emit stable HTTP, network and Database attributes.
  • Remove config that allow to send old metrics
  • Update documentation
  • Cleanup removing functions, files and sem conv no longer used

Affected packages:

  • instrumentation-amqplib
  • instrumentation-aws-sdk
  • instrumentation-cassandra-driver
  • instrumentation-document-load
  • instrumentation-hapi
  • instrumentation-ioredis
  • instrumentation-knex
  • instrumentation-memcached
  • instrumentation-mongodb
  • instrumentation-mongoose
  • instrumentation-mysql
  • instrumentation-mysql2
  • instrumentation-nestjs-core
  • instrumentation-net
  • instrumentation-pg
  • instrumentation-redis
  • instrumentation-tedious
  • sampler-aws-xray

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 106 out of 106 changed files in this pull request and generated 1 comment.

Comment thread packages/instrumentation-knex/README.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 106 out of 106 changed files in this pull request and generated 1 comment.

Comment thread packages/instrumentation-pg/src/semconv.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 106 out of 106 changed files in this pull request and generated 1 comment.

Comment thread packages/instrumentation-mysql/test/index.metrics.test.ts
@pichlermarc pichlermarc changed the title feat(several): only emit stable http, network and database attributes feat!: only emit stable http, network and database attributes Jul 1, 2026

@overbalance overbalance left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Browser 👌
Two suggestions and a question: Should we be importing attributes in test files or hardcoding the values when asserting? Hardcoding seems safer. I see a mix of both already...

Comment thread packages/instrumentation-document-load/src/instrumentation.ts Outdated
Comment thread packages/instrumentation-document-load/src/instrumentation.ts Outdated
@maryliag

maryliag commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Should we be importing attributes in test files or hardcoding the values when asserting?

The majority uses the attributes from semconv, so I tried to keep it that way

@pichlermarc pichlermarc 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.

Thank you for working on this. 🎉

I see db.client.connections.usage (which is deprecated) is still emitted by @opentelemetry/instrumentation-mysql and @opentelemetry/instrumentation-mongodb - but the replacement metric db.client.connection.count is still in-development.

WDYT: Should we just unconditionally emit db.client.connection.count instead like @opentelemetry/instrumentation-pg already does? Seems to be the least breaking way to me without having to have a flag that users have to flip on. Downside: if that metric changes we may have to break users again.

Edit: nevermind; I just saw the linked issue (#3590) so you had already noticed the same 😅

@maryliag

maryliag commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

What I was thinking is that ideally the metric would be replaced with the new one, so I was planning on doing that on a follow-up PR from this one. Then we can decide if is okay to have the breaking change before the 3.0 or wait for that to have the new PR merged.
Agree that if the metric change it would be a breaking change, but there isn't much we can do about that anyway.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.