Skip to content

feat: PG semantic convention stability migration#2076

Draft
hannahramadan wants to merge 2 commits intoopen-telemetry:mainfrom
hannahramadan:pg_semantic_stability
Draft

feat: PG semantic convention stability migration#2076
hannahramadan wants to merge 2 commits intoopen-telemetry:mainfrom
hannahramadan:pg_semantic_stability

Conversation

@hannahramadan
Copy link
Member

@hannahramadan hannahramadan commented Mar 14, 2026

This PR is intended to assist in the transition from the old to new database semantic conventions. Per the database semantic convention stability migration spec, users should be able to set the environment variable OTEL_SEMCONV_STABILITY_OPT_IN to:

  • database to emit stable conventions only
  • database/dup to emit both old and the stable conventions
  • a blank env var will emit old conventions only

The agent is required to maintain this bridge for 6 months and may drop the environment variable in the next major version and emit only the stable database and networking conventions.

This approach was approved for HTTP migration in #1547

Changes:

  • db.system -> db.system.name
  • net.peer.name -> server.address
  • net.peer.port -> server.port
  • db.name -> db.namespace
  • db.statement -> db.query.text
  • db.operation → db.operation.name change

Removed:

  • db.user
  • net.peer.ip
  • net.transport
  • net.sock.family
  • db.collection.name (Removed because accord to spec, we should only add if readily available)

Added:

  • error.type
  • server.port (if not default)

@hannahramadan hannahramadan changed the title feat: add database OTEL_SEMCONV_STABILITY_OPT_IN feat: PG semantic convention stability migration Mar 14, 2026
@hannahramadan hannahramadan marked this pull request as ready for review March 16, 2026 20:09
@hannahramadan hannahramadan marked this pull request as draft March 17, 2026 17:22
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.

1 participant