Remap OTel hostmetrics to Elastic metrics#277
Merged
lahsivjar merged 5 commits intoelastic:mainfrom Jun 5, 2024
Merged
Conversation
0f968a9 to
2ae4207
Compare
7466b40 to
3e64024
Compare
1 task
3e64024 to
7996be4
Compare
lahsivjar
commented
May 29, 2024
Comment on lines
+144
to
+155
|
|
||
| // set internal to false for metrics translated using OTel remappers. | ||
| if label, ok := event.Labels["event.provider"]; ok && label != nil { | ||
| internal = !(label.Value == "hostmetrics") | ||
| } | ||
|
|
||
| if internal { | ||
| for _, s := range event.Metricset.Samples { | ||
| if !IsInternalMetricName(s.Name) { | ||
| internal = false | ||
| break | ||
| } |
Contributor
Author
There was a problem hiding this comment.
[For reviewers] This code is required to make sure that the remapped OTel metrics end up in the app datastream instead of the internal datastream.
kruskall
previously approved these changes
May 29, 2024
endorama
reviewed
May 29, 2024
Contributor
endorama
left a comment
There was a problem hiding this comment.
Left a blocking comment and some minor non-blocking discussion points.
axw
reviewed
May 30, 2024
Member
axw
left a comment
There was a problem hiding this comment.
Code LGTM, just wondering about the event.provider check. I think we should come to an agreement on that before merging.
axw
previously approved these changes
Jun 5, 2024
Co-authored-by: Andrew Wilkins <axwalk@gmail.com>
axw
approved these changes
Jun 5, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR uses the library opentelemetry-lib to remap metrics produced by hostmetricsreceiver to Elastic metrics that could power the curated UIs.
Example OTel collector configuration required to get the remapping working
Related issues