Include resource attributes for live-check otlp emitted findings#1206
Include resource attributes for live-check otlp emitted findings#1206jerbly merged 8 commits intoopen-telemetry:mainfrom
Conversation
…extract-resource-attributes
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
…extract-resource-attributes
lquerel
left a comment
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Should we also ignore arrays of primitive JSON values?
I'm asking because in conversion.rs method maybe_to_json arrays are preserved.
…extract-resource-attributes
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
* 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>
Closes #1152
Live-check with
--emit-otlp-logswill 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.