-
Notifications
You must be signed in to change notification settings - Fork 528
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
Translate otel metrics to libbeat monitoring #15094
base: main
Are you sure you want to change the base?
Conversation
This pull request does not have a backport label. Could you fix it @kruskall? 🙏
|
|
634302f
to
642a89b
Compare
metrics were not being exported because the meter was not recognized as apm-server meter
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.
There are still many TODOs in the code, so it's unclear if this is ready for final review. At any rate, I should probably not be the final reviewer since I was involved in the initial implementation. It would be great if we could do this in stages, since this PR is pretty massive.
fmt.Sprintf("apm-server.processor.%s.transformations", eventType), | ||
) | ||
if err != nil { | ||
// TODO(axw) return err |
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.
Needs fixing
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.
I don't think this can panic. WDYT about ignoring the err like we did for outer counters ?
@@ -79,7 +54,17 @@ func RegisterGRPCServices( | |||
Semaphore: semaphore, | |||
RemapOTelMetrics: true, | |||
}) | |||
gRPCMonitoredConsumer.set(consumer) | |||
|
|||
// FIXME we should add an otel counter metric directly in the |
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.
I think this needs fixing before we merge anything?
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.
this shouldn't be needed now that we propagate the meterprovider instead of reusing a global meter.
I also think adding metrics to apm-data is not as simple since we need to keep other systems in mind (that's a library).
if value, ok := getScalarInt64(m.Data); ok { | ||
monitoring.ReportInt(v, "indexers.destroyed", value) | ||
} | ||
// TODO output.elasticsearch.indexers.active (created - destroyed?) |
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.
TODO
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.
this is not produced by the go-docappender, it's one of the legacy metrics. If we think it's useful we should add it there. WDYT ?
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.
Reviewed on a high level in an initial round and agree with the general direction.
However, this PR is huge which makes it very hard to spot subtle bugs or potential issues. Therefore +1 on @axw 's suggestions to split this PR up into smaller chunks.
I don't think it's possible to split this PR given how dependant on each other the packages are. I'll try. |
Split into #15360. That's probably as small as it gets |
Motivation/summary
use otel api to record metrics and export them to beats monitoring
Checklist
For functional changes, consider:
How to test these changes
Related issues
Related to #14488