Skip to content

F-044 (P6) β€” Telemetry:Instance is mapped to deployment.environment.name (semantic mismatch)Β #87

Description

@LarsLaskowski

Severity: 🟑 Β· Criterion: K11 / K12 Β· Phase: P6 Β· Status (review): πŸ†•

File(s): src/DockerUpdateGuard.Telemetry/TelemetryServiceCollectionExtensions.cs:221-225; src/DockerUpdateGuard.Telemetry/TelemetryResourceAttributeNames.cs:13; src/DockerUpdateGuard.Telemetry/TelemetryOptions.cs:30-32

Finding

The option TelemetryOptions.Instance is documented as "Logical deployment instance
name" but is set as the resource attribute deployment.environment.name
(ConfigureResource, :221-225). Per the OpenTelemetry semantic conventions,
deployment.environment.name denotes the environment (e.g. production/staging), while an
instance is expressed via service.instance.id. If an operator sets Instance="node-1"
per the docs, this value appears in the backend as the deployment environment "node-1" β€”
misleading. Either the option is misnamed (meant: environment) or the attribute is
chosen wrong (meant: instance ID).

Impact

Misattributed telemetry resources; dashboards/filters by "environment"
or "instance" find nothing or mix the dimensions. Purely a convention/
correctness issue of the observability metadata.

Recommendation

Clarify the intent and align: either rename the option to Environment and
keep it on deployment.environment.name, or switch the attribute to service.instance.id
(possibly offer both concepts separately). Side point: GetServiceVersion (:249)
reads the version only from the environment variable DockerUpdateGuard__DisplayVersion (not from
IConfiguration); a DisplayVersion set via appsettings is ignored for telemetry
(the fallback to InformationalVersion is correct) β€” check for consistency.


Auto-generated from the repository code review. Source of truth: docs/review/findings.md β†’ F-044 (P6), branch review/review-analysis-plan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions