Skip to content

Include resource attributes for live-check otlp emitted findings#1206

Merged
jerbly merged 8 commits intoopen-telemetry:mainfrom
jerbly:extract-resource-attributes
Feb 16, 2026
Merged

Include resource attributes for live-check otlp emitted findings#1206
jerbly merged 8 commits intoopen-telemetry:mainfrom
jerbly:extract-resource-attributes

Conversation

@jerbly
Copy link
Contributor

@jerbly jerbly commented Feb 15, 2026

Closes #1152

Live-check with --emit-otlp-logs will now include the attributes from the resource in the emitted log record, this helps to identify the source of the finding in a multi-source environment.

  • Spans, metrics, and logs now carry a reference to their parent resource, making resource attributes accessible during live checking.
  • All advisors now include resource attributes in their findings output when emitting log records.
  • The OTLP ingester now extracts and attaches resource data when converting incoming signals to internal sample types.

@jerbly jerbly requested a review from a team as a code owner February 15, 2026 19:41
@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.3%. Comparing base (f57f4c9) to head (a4e3fdb).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rates/weaver_live_check/src/advice/type_advisor.rs 72.7% 3 Missing ⚠️
...weaver_live_check/src/advice/deprecated_advisor.rs 66.6% 1 Missing ⚠️
crates/weaver_live_check/src/advice/mod.rs 50.0% 1 Missing ⚠️
crates/weaver_live_check/src/lib.rs 83.3% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1206   +/-   ##
=====================================
  Coverage   80.3%   80.3%           
=====================================
  Files        109     109           
  Lines       8830    8855   +25     
=====================================
+ Hits        7091    7112   +21     
- Misses      1739    1743    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@lquerel lquerel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

In its current form, I have the impression that this PR does not allow reporting resource attributes that are arrays of primitive values. I'm thinking in particular of attributes such as host.ip, host.mac, or even process.command_args, which are arrays of strings and could quite easily appear in the list of resource attributes. This could be added in a separate PR or in this one, up to you.

}
}
JsonValue::Bool(b) => Some(AnyValue::from(*b)),
JsonValue::Null | JsonValue::Object(_) | JsonValue::Array(_) => None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also ignore arrays of primitive JSON values?
I'm asking because in conversion.rs method maybe_to_json arrays are preserved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@jerbly jerbly merged commit 3b8b8ca into open-telemetry:main Feb 16, 2026
25 checks passed
ArthurSens added a commit to ArthurSens/weaver that referenced this pull request Feb 20, 2026
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
jerbly added a commit that referenced this pull request Feb 21, 2026
* Implement weaver registry infer command

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* cargo fmt

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Replace to_string with to_owned in string literals

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Replace YamlGroup with semconv::GroupSpec

Serde should be able to handle the YAML serialization

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Add tests for implemented functionality

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* cargo fmt

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Add TODO comment about span event deprecation

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Log if trying to add unsupported Sample type

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Fix clippy findings

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Add warning about stability of infer command

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Remove optional from accumulated metric instrument

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Refactor Examples handling

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Fix sanitization

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* lint and fmt

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* More clippy warning fixes

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* DRY resource accumulation

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Fixes after #1206

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Add changelog entry

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>

* Apply suggestion from @jerbly

---------

Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Co-authored-by: Jeremy Blythe <jeremyblythe@gmail.com>
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.

Allow extracting resource attributes from the source signal

2 participants