Skip to content

semconvkit: add invariant test for histogram-exclusion rule#8370

Open
thealpha93 wants to merge 2 commits into
open-telemetry:mainfrom
thealpha93:main
Open

semconvkit: add invariant test for histogram-exclusion rule#8370
thealpha93 wants to merge 2 commits into
open-telemetry:mainfrom
thealpha93:main

Conversation

@thealpha93
Copy link
Copy Markdown

Description

Fixes #8353.

Adds TestNoInvalidObservableHistogramTypes to internal/tools/semconvkit/main_test.go that asserts the histogram-exclusion conditional in metric.go.j2 is never accidentally removed or bypassed.

The test walks all semconv/v1.*/*conv/metric.go files and fails if HistogramObservable or ObservableObservable appear in any of them, catching regressions at make precommit time.

Changes

  • Added TestNoInvalidObservableHistogramTypes in internal/tools/semconvkit/main_test.go
  • Updated CHANGELOG.md

thealpha93 and others added 2 commits May 23, 2026 13:39
…pes in generated metrics

Introduces a test that ensures the semconv code generator does not emit types containing "HistogramObservable" or "ObservableObservable", maintaining compliance with the histogram-exclusion rule.

Fixes open-telemetry#8353
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented May 23, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: thealpha93 / name: Aakash T M (1f71734)
  • ✅ login: thealpha93 / name: thealpha93 (9ef9d71)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

semconv codegen: add invariant test for histogram-exclusion rule in metric.go.j2

1 participant