Skip to content

Conversation

@zeitlinger
Copy link
Member

Update to latest declarative configuration.

See open-telemetry/opentelemetry-configuration#474 for a clarification in semantics.

@zeitlinger zeitlinger requested a review from a team as a code owner December 21, 2025 08:58
@zeitlinger zeitlinger self-assigned this Dec 21, 2025
@codecov
Copy link

codecov bot commented Dec 21, 2025

Codecov Report

❌ Patch coverage is 93.33333% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.10%. Comparing base (0766428) to head (57bbd9c).

Files with missing lines Patch % Lines
...ometheus/internal/PrometheusComponentProvider.java 66.66% 0 Missing and 2 partials ⚠️
.../exporter/prometheus/Otel2PrometheusConverter.java 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7934      +/-   ##
============================================
+ Coverage     90.09%   90.10%   +0.01%     
- Complexity     7432     7447      +15     
============================================
  Files           834      835       +1     
  Lines         22537    22574      +37     
  Branches       2236     2240       +4     
============================================
+ Hits          20304    20340      +36     
+ Misses         1532     1531       -1     
- Partials        701      703       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

* @deprecated {@code otel_scope_*} attributes are always generated.
*/
/** Set if the {@code otel_scope_*} attributes are generated. Default is {@code true}. */
@SuppressWarnings("UnusedReturnValue")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These suppressions should go on the caller, not this method. If we wanted to inform callers that the response can safely be ignored, we'd use @CanIgnoreReturnValue.

https://errorprone.info/bugpattern/CheckReturnValue

I think you probably copy / pasted this. It must have slipped through the cracks.

import javax.annotation.Nullable;

/** Builder for {@link PrometheusMetricReader}. */
public final class PrometheusMetricReaderBuilder {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, the PrometheusMetricReader isn't part of the spec. I suppose it makes sense to keep the configuration options in sync with PrometheusHttpServer. Is that the idea here?

counter.add(1);
}

@SuppressWarnings("resource")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know you didn't write this but this suppression is redundant since this warning is already suppressed at the class level

Copy link
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of nits but looks good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants