Include resource attributes for live-check otlp emitted findings#1206
Conversation
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:
|
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.
Signed-off-by: Arthur Silva Sens <[email protected]>
* Implement weaver registry infer command Signed-off-by: Arthur Silva Sens <[email protected]> * cargo fmt Signed-off-by: Arthur Silva Sens <[email protected]> * Replace to_string with to_owned in string literals Signed-off-by: Arthur Silva Sens <[email protected]> * Replace YamlGroup with semconv::GroupSpec Serde should be able to handle the YAML serialization Signed-off-by: Arthur Silva Sens <[email protected]> * Add tests for implemented functionality Signed-off-by: Arthur Silva Sens <[email protected]> * cargo fmt Signed-off-by: Arthur Silva Sens <[email protected]> * Add TODO comment about span event deprecation Signed-off-by: Arthur Silva Sens <[email protected]> * Log if trying to add unsupported Sample type Signed-off-by: Arthur Silva Sens <[email protected]> * Fix clippy findings Signed-off-by: Arthur Silva Sens <[email protected]> * Add warning about stability of infer command Signed-off-by: Arthur Silva Sens <[email protected]> * Remove optional from accumulated metric instrument Signed-off-by: Arthur Silva Sens <[email protected]> * Refactor Examples handling Signed-off-by: Arthur Silva Sens <[email protected]> * Fix sanitization Signed-off-by: Arthur Silva Sens <[email protected]> * lint and fmt Signed-off-by: Arthur Silva Sens <[email protected]> * More clippy warning fixes Signed-off-by: Arthur Silva Sens <[email protected]> * DRY resource accumulation Signed-off-by: Arthur Silva Sens <[email protected]> * Fixes after #1206 Signed-off-by: Arthur Silva Sens <[email protected]> * Add changelog entry Signed-off-by: Arthur Silva Sens <[email protected]> * Apply suggestion from @jerbly --------- Signed-off-by: Arthur Silva Sens <[email protected]> Co-authored-by: Jeremy Blythe <[email protected]>
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.