-
Notifications
You must be signed in to change notification settings - Fork 901
Implement new SemConv exporter health metrics #7265
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
Conversation
Hey @JonasKunz give me a heads up when you think this is ready for review. Happy to start with a high level review while its still in draft! |
@jack-berg a high level review would be appreciated! I'm happy with the overall structure and would mostly polish from now on, so it would be great to get your feedback before I polish things we'll end up changing anyway. I've updated the PR comment to give an introduction on how I envision the feature implementation in general. |
# Conflicts: # exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java # exporters/otlp/all/src/main/java/io/opentelemetry/exporter/otlp/http/metrics/OtlpHttpMetricExporterBuilder.java # exporters/otlp/all/src/main/java/io/opentelemetry/exporter/otlp/metrics/OtlpGrpcMetricExporterBuilder.java
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 variety of comments, but this is on the right track. Thanks for working on this.
private static final AttributeKey<Boolean> ATTRIBUTE_KEY_SUCCESS = booleanKey("success"); | ||
/** | ||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at | ||
* any time. |
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.
Out of curiosity did the build force this comment to pass?
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.
Yes:
> Compilation failed; see the compiler output below.
/Users/jonas/git/otel/opentelemetry-java/exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java:29: warning: [OtelInternalJavadoc] This public internal class doesn't end with any of the applicable javadoc disclaimers: "This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.", or "This class is internal and experimental. Its APIs are unstable and can change at any time. Its APIs (or a version of them) may be promoted to the public stable API in the future, but no guarantees are made."
public enum Signal {
^
(see https://errorprone.info/bugpattern/OtelInternalJavadoc)
1 error
1 warning
Is that not intentional?
sdk/common/src/main/java/io/opentelemetry/sdk/common/HealthMetricLevel.java
Outdated
Show resolved
Hide resolved
exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetricsAdapter.java
Outdated
Show resolved
Hide resolved
exporters/zipkin/src/main/java/io/opentelemetry/exporter/zipkin/ZipkinSpanExporterBuilder.java
Outdated
Show resolved
Hide resolved
exporters/zipkin/src/main/java/io/opentelemetry/exporter/zipkin/ZipkinSpanExporterBuilder.java
Outdated
Show resolved
Hide resolved
exporters/otlp/all/src/jmh/java/io/opentelemetry/exporter/otlp/trace/OltpExporterBenchmark.java
Outdated
Show resolved
Hide resolved
exporters/common/src/main/java/io/opentelemetry/exporter/internal/http/HttpExporterBuilder.java
Outdated
Show resolved
Hide resolved
exporters/common/src/main/java/io/opentelemetry/exporter/internal/http/HttpExporterBuilder.java
Outdated
Show resolved
Hide resolved
exporters/common/src/main/java/io/opentelemetry/exporter/internal/http/HttpExporter.java
Outdated
Show resolved
Hide resolved
exporters/common/src/main/java/io/opentelemetry/exporter/internal/http/HttpExporter.java
Outdated
Show resolved
Hide resolved
# Conflicts: # docs/apidiffs/current_vs_latest/opentelemetry-exporter-otlp.txt # docs/apidiffs/current_vs_latest/opentelemetry-exporter-zipkin.txt # docs/apidiffs/current_vs_latest/opentelemetry-sdk-common.txt
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 may be opportunities to clean up some things (e.g. its not great that ExporterInstrumentation and ExporterMetrics each have an internal class/interface called Recording), but this is great start as far as I'm concerned. New public API surface area and telemetry output looks good.
A couple more non-blocking comments
exporters/common/src/test/java/io/opentelemetry/exporter/internal/http/HttpExporterTest.java
Show resolved
Hide resolved
exporters/common/src/test/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterTest.java
Show resolved
Hide resolved
exporters/common/src/test/java/io/opentelemetry/exporter/internal/http/FakeHttpResponse.java
Outdated
Show resolved
Hide resolved
...rs/common/src/main/java/io/opentelemetry/exporter/internal/metrics/ServerAttributesUtil.java
Outdated
Show resolved
Hide resolved
.../java/io/opentelemetry/exporter/otlp/testing/internal/AbstractGrpcTelemetryExporterTest.java
Outdated
Show resolved
Hide resolved
…nal/grpc/GrpcExporterTest.java Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
…nal/http/HttpExporterTest.java Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com>
This PR implements the new, experimental exporter health metrics defined in semantic conventions. The other metrics will be added in follow-up PRs.
We already have some experimental health metrics in the SDK, which I intend to eventually replace with the new ones from semantic conventions. I'm envisioning the replacement process as follows:
on
,off
,legacy
and maybe in the futureextended
for opt-in attributes / metricslegacy
toon
, this will be a breaking change