Repository navigation
Conversation
|
Pull request dashboard statusWaiting on the author · refreshed 2026-11-30 23:08 UTC Respond to 5 review items (e.g. link a commit, explain why not, ask a follow-up): Status above doesn't look right?
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9039 +/- ##
============================================
- Coverage 90.56% 90.55% -0.02%
- Complexity 11220 11226 +6
============================================
Files 1032 1034 +2
Lines 30599 30616 +17
Branches 4010 4007 -3
============================================
+ Hits 27711 27723 +12
- Misses 1913 1918 +5
Partials 975 975 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
abdessattar23
left a comment
There was a problem hiding this comment.
I went through the refactoring and the overall direction looks consistent with the *.impl convention and #6970.
One compatibility concern: relocating RetryUtil, TlsUtil, and DaemonThreadFactory removes their previous internal binary names. Older sender/SDK artifacts paired with newer common artifacts can therefore encounter NoClassDefFoundError. I realize internal APIs aren't covered by semver guarantees, but given the version-alignment motivation of #6970, would it make sense to retain delegating compatibility shims, or is that one-time break intentional?
Also, now that these classes are part of the stable impl API surface, a few public constructors and methods need complete Javadocs, notably DaemonThreadFactory(String), TlsUtil.keyManager, TlsUtil.trustManager, and RetryUtil.retryAfterNanos
|
@abdessattar23 Yes. It is intentional. |
|
Hi @rooks-ns — just a friendly reminder that this pull request is waiting on you. The dashboard status comment has the open items and is kept current.
|
jack-berg
left a comment
There was a problem hiding this comment.
Thanks - couple of comments, but this is long overdue. 🙂
| * <p>This class is not intended for use by application developers. Its API is stable and will not | ||
| * be changed or removed in a backwards-incompatible manner. |
There was a problem hiding this comment.
Could we resolve the default trust manager in TlsConfigHelper and pass it alongside the SSL context through HttpSenderConfig / GrpcSenderConfig, instead of making TlsUtil.defaultTrustManager() stable? Those interfaces already promise a non-null trust manager when the context is non-null. Initializing the context with that manager would satisfy the contract and avoid delegating this default to individual senders.
| */ | ||
|
|
||
| package io.opentelemetry.exporter.internal; | ||
| package io.opentelemetry.exporter.impl; |
There was a problem hiding this comment.
Could TlsUtil.keyManager and TlsUtil.trustManager stay internal? Their only production caller is TlsConfigHelper, in this module. The other callers are tests, which can use shared internal code without requiring a stable API commitment.
| * This class is not intended for use by application developers. Its API is stable and will not be | ||
| * changed or removed in a backwards-incompatible manner. |
There was a problem hiding this comment.
retryableGrpcStatusCodes() and retryableHttpResponseCodes() encode OTLP retry policy, but the senders are not restricted to OTLP. Rather than stabilizing these as generic retry utilities, could we pass retryable status codes through HttpSenderConfig / GrpcSenderConfig and have the OTLP implementations supply the OTLP-specific sets? Any new configuration methods would need compatibility-preserving defaults.
| */ | ||
|
|
||
| package io.opentelemetry.exporter.internal; | ||
| package io.opentelemetry.exporter.impl; |
There was a problem hiding this comment.
Making retryAfterNanos stable makes sense, but could it live in sdk:common, alongside the sender SPI in io.opentelemetry.sdk.common.export, under an HTTP-specific utility name? Parsing Retry-After is HTTP transport functionality, not exporter-specific policy.
| * <p>This class is not intended for use by application developers. Its API is stable and will not | ||
| * be changed or removed in a backwards-incompatible manner. |
There was a problem hiding this comment.
Moving this to impl makes sense. Before stabilizing the constructors, could we replace them with static factories, e.g. create(namePrefix) and createWithDelegate(namePrefix, delegate)? Named factories let us express the purpose of each creation variant without committing to constructor overloads.
jkwatson
left a comment
There was a problem hiding this comment.
I'm ok with the changes in the impl packages if Jack is ok with them
6b30bd4 to
bf6c611
Compare
…opagators - Relocate DaemonThreadFactory to io.opentelemetry.sdk.common.impl with private constructors and static factory methods, retaining a @deprecated bridge in sdk.common.internal for binary backward-compatibility - Add HttpExportUtil.retryAfterNanos to sdk:common and remove sender-jdk dependency on exporters:common - Pass retryable HTTP and gRPC status codes through HttpSenderConfig and GrpcSenderConfig, with OTLP configs supplying the canonical status code sets - Resolve default trust manager statelessly in TlsConfigHelper, keeping TlsUtil internal without state mutation - Remove sender-okhttp production dependency on exporters:common - Un-exempt sender-jdk, sender-okhttp, and trace-propagators from NoSharedInternalCodeTest
bf6c611 to
6ac369c
Compare
| private final long maxResponseBodySize; | ||
|
|
||
| /** Create a sender. */ | ||
| /** Create a sender with custom retryable status codes. */ |
There was a problem hiding this comment.
#nit its silly to specify "with custom retryable status codes" since that suggests we should "and custom " for every argument accepted in the constructor.
| try { | ||
| return TlsUtil.defaultTrustManager(); |
There was a problem hiding this comment.
Could we resolve the SSL context and default trust manager as a pair once per build? getSslContext() calls getTrustManager() internally, then exporter construction calls getTrustManager() again. With no explicit manager configured, these resolve separate instances rather than passing the manager used to initialize the context. This also repeats default trust-store initialization. The resolved pair should not prevent subsequent builder configuration.
| @Override | ||
| public Set<GrpcStatusCode> getRetryableGrpcStatusCodes() { | ||
| return RetryUtil.retryableGrpcStatusCodeEnums(); |
There was a problem hiding this comment.
Could both ImmutableGrpcSenderConfig and ImmutableHttpSenderConfig inherit the interface defaults instead of overriding them to call RetryUtil? The defaults already contain the same OTLP retryable codes. We could then remove RetryUtil and its tests after updating the remaining test-infrastructure caller, ManagedChannelTelemetryExporterBuilder, to obtain the codes from a sender config. This avoids maintaining duplicate lists.
| * | ||
| * @deprecated Use {@link io.opentelemetry.sdk.common.impl.DaemonThreadFactory} instead. | ||
| */ | ||
| @Deprecated |
There was a problem hiding this comment.
Could we remove the old internal class and its compatibility test instead of retaining a deprecated forwarding shim? Internal APIs have no compatibility guarantees, so this can simply move to impl with the new factories.
Description
Addresses #6970 by un-exempting sender and propagator modules from
NoSharedInternalCodeTest:*.implpackages with@OtelImplJavadocand regenerated jApiCmp baselines:RetryUtil->io.opentelemetry.exporter.impl(opentelemetry-exporter-common)DaemonThreadFactory->io.opentelemetry.sdk.common.impl(opentelemetry-sdk-common)TlsUtil->io.opentelemetry.exporter.impl(opentelemetry-exporter-common)Marshalerinternal import inGrpcRequestBody(opentelemetry-exporter-sender-okhttp).NoSharedInternalCodeTest:opentelemetry-exporter-sender-jdkopentelemetry-extension-trace-propagatorsopentelemetry-exporter-sender-okhttpRelated Issues