Skip to content

Instrumentation should assume OTEL_SEMCONV_STABILITY_OPT_IN has a list of values #7246

Open
@XSAM

Description

@XSAM

Description

Current implementation often assumes OTEL_SEMCONV_STABILITY_OPT_IN has one value. For instance, in HTTP shared semconv library.

env := strings.ToLower(os.Getenv(OTelSemConvStabilityOptIn))
duplicate := env == "http/dup"
server := HTTPServer{
duplicate: duplicate,
}

This only works when users want to change the behavior for one category of semconv, like setting it for http only. If users want to set up multiple categories of semconv, like http,database, the current implementation will break.

https://opentelemetry.io/docs/specs/semconv/http/

SHOULD introduce an environment variable OTEL_SEMCONV_STABILITY_OPT_IN in the existing major version which is a comma-separated list of values.

Affected packages

  • All HTTP related packages that use internal/shared/semconv/env.go.tmpl @open-telemetry/go-maintainers
  • otelmongo @prestonvasquez

Expected behavior

Implementation should assume that they would receive a list of values from OTEL_SEMCONV_STABILITY_OPT_IN, like http,database.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions