-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remap OTel hostmetrics to Elastic metrics #277
Conversation
0f968a9
to
2ae4207
Compare
7466b40
to
3e64024
Compare
3e64024
to
7996be4
Compare
model/modelprocessor/datastream.go
Outdated
|
||
// 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 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a blocking comment and some minor non-blocking discussion points.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, just wondering about the event.provider
check. I think we should come to an agreement on that before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Co-authored-by: Andrew Wilkins <[email protected]>
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