Skip to content

azuredevops: work_item.cycle_time / work_item.age silently avg-merge datapoints under otel v0.156.0 #817

Description

@Valinora

Under otel collector v0.156.0 the regenerated mdatagen metrics builder merges datapoints sharing an identical attribute-set + timestamp (gauges avg-merge, ints truncate). The azuredevops work_item.cycle_time (keyed by [work_item.type, project.name]) and work_item.age (keyed by [work_item.type, work_item.state, project.name]) metrics have low-cardinality key sets, so any two work items of the same type/state in one project collide within a single scrape and are silently averaged — lossy for durations.

PR #811 fixed the analogous vcs.change.* collisions by adding vcs.change.id (semconv conditionally_required, existing in-repo precedent). The work_item metrics have no equivalent: there is no semconv work_item.id, and adding a unique id as a metric attribute would be a cardinality anti-pattern (one series per work item).

Options to decide:

  • (a) Add a custom work_item.id attribute → per-item series (accept cardinality).
  • (b) Declare the metric an intentional aggregate by type/state (document the avg semantics; note int-truncation is lossy for durations).
  • (c) Re-shape as a histogram (the correct form for a duration distribution).

Highest-severity of the v0.156.0 merge regressions (collision is guaranteed, not conditional), but requires a product decision on metric semantics, so deferred out of the dependency bump (PR #811).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions