Skip to content

fix(live-check): findings on resource samples carry resource attributes - #1612

Open
fabiovincenzi wants to merge 3 commits into
open-telemetry:mainfrom
fabiovincenzi:fix/live-check-resource-sample-attributes
Open

fix(live-check): findings on resource samples carry resource attributes#1612
fabiovincenzi wants to merge 3 commits into
open-telemetry:mainfrom
fabiovincenzi:fix/live-check-resource-sample-attributes

Conversation

@fabiovincenzi

Copy link
Copy Markdown

Problem

Findings on resource-level attributes are emitted (via --emit-otlp-logs) with
none of the source resource's attributes, while findings on span/metric/log
samples correctly carry them.

Sample::resource() returns None for a Sample::Resource: it only returns a
sample's parent resource, and a resource has no parent.

Fix

Make a resource sample its own resource.

The only other callers are sample_log.rs and sample_metric.rs, and both only
ever run on log/metric samples, so this doesn't change anything for them.

Testing

Unit tests covering: a resource sample is its own resource, span samples still
return their parent resource, samples without one still return None, and the
emit path flattens a resource sample's attributes into a finding.
Without the fix these fail with left: None, right: Some("my-test-service").

@fabiovincenzi
fabiovincenzi requested a review from a team as a code owner July 20, 2026 12:44
@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 20, 2026

Copy link
Copy Markdown

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

  • ✅ login: fabiovincenzi / name: Fabio Vincenzi (a18a36d)
  • ✅ login: fabiovincenzi / name: fabiovincenzi (03ec5b2)

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 20, 2026

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-08-04 14:26 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

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.

1 participant