Skip to content

Implement OTEL_SEMCONV_STABILITY_OPT_IN within database instrumentations #1615

@hannahramadan

Description

@hannahramadan

Follow the guidelines listed in Semantic Conventions DB Migrations to implement the OTEL_SEMCONV_STABILITY_OPT_IN environment variable. This is a requirement before stable DB semantic conventions can be added to instrumentation.

Semantic conventions for database calls and systems are currently in a mixed status. Semantic conventions for SQL databases client operations are stable, so let's start with implementing those.

SHOULD NOT change the version of the database conventions that they emit by default in their existing major version. Conventions include (but are not limited to) attributes, metric and span names, and unit of measure.
SHOULD introduce an environment variable OTEL_SEMCONV_STABILITY_OPT_IN in their existing major version, which accepts:
database - emit the stable database conventions, and stop emitting the old database conventions that the instrumentation emitted previously.
database/dup - emit both the old and the stable database conventions, allowing for a phased rollout of the stable semantic conventions.
The default behavior (in the absence of one of these values) is to continue emitting whatever version of the old database conventions the instrumentation was emitting previously.
Need to maintain (security patching at a minimum) their existing major version for at least six months after it starts emitting both sets of conventions.
May drop the environment variable in their next major version and emit only the stable database conventions.
[!NOTE] OTEL_SEMCONV_STABILITY_OPT_IN is only intended to be used when migrating from an experimental semantic convention to its initial stable version.

SQL Libraries:

  • MySQL2
  • Trilogy
  • Pg

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedkeepEnsures stale-bot keeps this issue/PR open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions