GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Implement new SemConv exporter health metrics by JonasKunz · Pull Request #7265 · open-telemetry/opentelemetry-java

Conversation

@JonasKunz

@JonasKunz JonasKunz commented Apr 10, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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:

  • Implement the new health metrics in a series of PRs, but have them opt-in and keep reporting the legacy metrics by default
  • Add autoconfiguration support to configure the health metrics level: e.g. on, off, legacy and maybe in the future extended for opt-in attributes / metrics
  • Switch the default setting from legacy to on, this will be a breaking change
  • After some grace period remove support for the legacy metrics

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
JonasKunz added 13 commits April 9, 2025 12:35
@JonasKunz
Add implementation for new exporter health metrics
4bb3e56
@JonasKunz
Use new implementation in GRPC exporters
dd651c3
@JonasKunz
Use new implementation in HTTP exporters
20959d8
@JonasKunz
Use new implementation in zipkin exporter
4bafbfa
@JonasKunz
Merge remote-tracking branch 'otel/main' into health-metrics
67fe9ec
@JonasKunz
add javadoc since tags
073ecee
@JonasKunz
spotless
ba07867
@JonasKunz
Fix javadoc and style issues
5281d9a
@JonasKunz
Added test for HTTP Exporter
e560424
@JonasKunz
Implemented duration metric
2f29ac2
@JonasKunz
spotless
a2a78f7
@JonasKunz
Added GRPC test
0bfa4f4
@JonasKunz
Added server.* attributes
149ffbd
@jack-berg

jack-berg commented Apr 11, 2025

Copy link
Copy Markdown
Member

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!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@JonasKunz

JonasKunz commented Apr 14, 2025

Copy link
Copy Markdown
Contributor Author

@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

JonasKunz added 6 commits April 16, 2025 09:50
@JonasKunz
Added tests for server.* attribute extraction
22ba608
@JonasKunz
Adjust metric names to now merged semconv PR
8522179
@JonasKunz
Merge remote-tracking branch 'otel/HEAD' into health-metrics
d4afdc9
@JonasKunz
spotless
9adacd0
@JonasKunz
Implement status code attributes
676b66c
@JonasKunz
Merge remote-tracking branch 'otel/main' into health-metrics
6d5bf61
# 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
jack-berg
jack-berg reviewed Apr 30, 2025
View reviewed changes

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetrics.java Outdated
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.

@jack-berg jack-berg Apr 30, 2025

Copy link
Copy Markdown
Member

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@JonasKunz JonasKunz May 5, 2025

Copy link
Copy Markdown
Contributor Author

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread sdk/common/src/main/java/io/opentelemetry/sdk/common/HealthMetricLevel.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/common/src/main/java/io/opentelemetry/exporter/internal/ExporterMetricsAdapter.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/zipkin/src/main/java/io/opentelemetry/exporter/zipkin/ZipkinSpanExporterBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/zipkin/src/main/java/io/opentelemetry/exporter/zipkin/ZipkinSpanExporterBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/otlp/all/src/jmh/java/io/opentelemetry/exporter/otlp/trace/OltpExporterBenchmark.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/common/src/main/java/io/opentelemetry/exporter/internal/http/HttpExporterBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/common/src/main/java/io/opentelemetry/exporter/internal/http/HttpExporterBuilder.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/common/src/main/java/io/opentelemetry/exporter/internal/http/HttpExporter.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/common/src/main/java/io/opentelemetry/exporter/internal/http/HttpExporter.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

JonasKunz added 8 commits May 5, 2025 12:02
@JonasKunz
Renames
ec686d3
@JonasKunz
Introduce interface as abstraction
ad69fa5
@JonasKunz
Complete renaming of "HealthMetricLevel"
a1cd746
@JonasKunz
Remove since tags
48b6320
@JonasKunz
Add tests for semconv attributes
32943e1
@JonasKunz
Move standard component types to enum
d2db75d
@JonasKunz
spotless
5f94bb5
@JonasKunz
Fix compilation
5b71238
JonasKunz added 9 commits May 20, 2025 13:50
@JonasKunz
Inline unnecessary ComponentId.put method
7fbf2db
@JonasKunz
Add StandardComponentId to not have to pass the type around separately
66cd86e
@JonasKunz
Merge remote-tracking branch 'otel/main' into health-metrics
4202870
# 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
@JonasKunz
Rename InternalTelemetrySchemaVersion and its setters
c5051ed
@JonasKunz
Remove DISABLED telemetry schema version
1b037a5
@JonasKunz
Rename and move standard exporter types
3a89f42
@JonasKunz
Exclude profiles exporter from metrics
aa96250
@JonasKunz
apidiff
b472345
@JonasKunz
fix japicmp
7d9b16e
@JonasKunz
JonasKunz requested a review from jack-berg May 20, 2025 13:35
jack-berg
jack-berg approved these changes May 27, 2025
View reviewed changes

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread exporters/common/src/test/java/io/opentelemetry/exporter/internal/http/HttpExporterTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/common/src/test/java/io/opentelemetry/exporter/internal/grpc/GrpcExporterTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread exporters/common/src/test/java/io/opentelemetry/exporter/internal/http/FakeHttpResponse.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread ...rs/common/src/main/java/io/opentelemetry/exporter/internal/metrics/ServerAttributesUtil.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread .../java/io/opentelemetry/exporter/otlp/testing/internal/AbstractGrpcTelemetryExporterTest.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

JonasKunz and others added 5 commits May 28, 2025 14:41
@JonasKunz @jack-berg
Update exporters/common/src/test/java/io/opentelemetry/exporter/inter…
51edc50
…nal/grpc/GrpcExporterTest.java

Co-authored-by: jack-berg <[email protected]>
@JonasKunz @jack-berg
Update exporters/common/src/test/java/io/opentelemetry/exporter/inter…
8ff0381
…nal/http/HttpExporterTest.java

Co-authored-by: jack-berg <[email protected]>
@JonasKunz
Review fixes
a52d607
@JonasKunz
Merge remote-tracking branch 'otel/main' into health-metrics
165f9a6
@JonasKunz
Use assum to early-out of test
03496e8
jkwatson
jkwatson reviewed May 28, 2025
View reviewed changes
Comment thread sdk/common/src/main/java/io/opentelemetry/sdk/internal/Signal.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

jkwatson
jkwatson reviewed May 28, 2025
View reviewed changes
Comment thread sdk/common/src/main/java/io/opentelemetry/sdk/internal/StandardComponentId.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

trask
trask reviewed May 29, 2025
View reviewed changes
Comment thread sdk/common/src/main/java/io/opentelemetry/sdk/common/InternalTelemetryVersion.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

JonasKunz added 4 commits May 30, 2025 10:28
@JonasKunz
remove Signal.toString
b53cbe9
@JonasKunz
remove StandardComponentId.toString
6350dff
@JonasKunz
Remove InternalTelemetryVersion.V1_33
e307e60
@JonasKunz
spotless
00b4f2f
jack-berg
jack-berg approved these changes Jun 3, 2025
View reviewed changes
@jack-berg
japicmp
8e89011
@jack-berg
jack-berg merged commit f720735 into open-telemetry:main Jun 3, 2025
@JonasKunz JonasKunz mentioned this pull request Jun 18, 2025
Implement span started and live health metrics #7430
Closed
@anuraaga anuraaga mentioned this pull request Dec 5, 2025
Implement SDK metrics for trace #7895
Merged
@thswlsqls thswlsqls mentioned this pull request Sep 18, 2026
Assert metric exporter component types against semconv in ComponentIdTest #8834
Merged
@juliocamarero juliocamarero mentioned this pull request Oct 9, 2026
Report OTLP log export outcome to the otel-delivery-gateway with OTel SDK exporter metrics elastic/elasticsearch#161513
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@trask trask trask left review comments
@jkwatson jkwatson jkwatson left review comments
@jack-berg jack-berg jack-berg approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@JonasKunz @jack-berg @trask @jkwatson
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.