-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Metering API Implementation #99723
Metering API Implementation #99723
Conversation
…ticsearch into otel-meter-api-integ
…search into stu-elastic-otel-meter-api
with the support of metrics the TracerPlugin name is no longer adequate. Renaming this to TelemetryPlugin. Also introducing TelemetryProvider interface. While it is only used in Node.java at the moment to fetch Tracer instance, it is intended to be used in Plugin::createComponents (to be done in separate commite due to the broad scope of this method) This will allow for plugins to get access to both Tracer and Metric interfaces without the need to add yet another argument to createComponents Also adding internal subpackage in module/apm so that it is more obvious which packages are not exported
update with latest main (package renames)
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'm not sure which is the correct PR to look at right now, but I had these comments from yesterday that I thought I would post. I only got through a small portion of the PR; this is not a complete review.
@@ -82,7 +84,7 @@ class APMJvmOptions { | |||
// is doing, leave this value alone. | |||
"log_level", "error", | |||
"application_packages", "org.elasticsearch,org.apache.lucene", | |||
"metrics_interval", "120s", | |||
"metrics_interval", "5s", |
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.
5 seconds seems pretty aggressive. Do we really need metric resolution at that granularity?
modules/apm/build.gradle
Outdated
dependencies { | ||
implementation "io.opentelemetry:opentelemetry-api:${otelVersion}" | ||
implementation "io.opentelemetry:opentelemetry-context:${otelVersion}" | ||
implementation "io.opentelemetry:opentelemetry-semconv:${otelVersion}-alpha" | ||
runtimeOnly "co.elastic.apm:elastic-apm-agent:1.36.0" | ||
implementation "co.elastic.apm:elastic-apm-agent:1.42.1-SNAPSHOT" |
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.
We should not commit a snapshot dependency, we'll need to wait until this is released.
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.
Sounds good.
AllocationService allocationService, | ||
IndicesService indicesService | ||
) { | ||
final APMTracer apmTracer = tracer.get(); | ||
final APMTracer apmTracer = telemetryProvider.get().getTracer(); |
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.
Why is the provider captured, when it is already passed in? It should be the exact same, so we could avoid the SetOnce?
@@ -50,10 +50,12 @@ class APMJvmOptions { | |||
// by the agent. Don't disable writing to a log file, as the agent will then | |||
// require extra Security Manager permissions when it tries to do something | |||
// else, and it's just painful. | |||
"log_file", "_AGENT_HOME_/../../logs/apm.log", | |||
|
|||
"log_file", "/Users/przemyslawgomulka/workspace/pgomulka/apm.log", |
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.
The log file and level need to be reset back to their original levels.
Superseded by #99832 |
This pulls in @pgomulka's branch stu-elastic-otel-meter-api and adds the elasticsearch versions of the otel instruments.