-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Closed as not planned
Closed as not planned
Copy link
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another
Description
It requires to override Beans for
OtlpHttpSpanExporter and OtlpGrpcSpanExporter, in order to populate RetryPolicy
In this case better would to have Customizer or Dedicated bean for HTTP\gRPC rather overriding Bean
@Bean
@ConditionalOnProperty(prefix = "management.otlp.tracing", name = "transport", havingValue = "grpc")
OtlpGrpcSpanExporter otlpGrpcSpanExporter(OtlpTracingProperties properties,
OtlpTracingConnectionDetails connectionDetails)
{
//org.springframework.boot.actuate.autoconfigure.tracing.otlp.OtlpTracingConfigurations$Exporters
RetryPolicy retryPolicy = RetryPolicy.builder()
.setMaxAttempts(5) // Max retry attempts
.setInitialBackoff(Duration.ofMillis(100)) // Initial backoff duration
.setMaxBackoff(Duration.ofSeconds(5)) // Max backoff duration
.setBackoffMultiplier(2.0) // Backoff multiplier
//.setMaxRetryDuration(Duration.ofMinutes(1)) // Maximum retry duration
.build();
OtlpGrpcSpanExporterBuilder builder = OtlpGrpcSpanExporter.builder()
.setRetryPolicy(retryPolicy) //********************************************
.setEndpoint(connectionDetails.getUrl(Transport.GRPC))
.setTimeout(properties.getTimeout())
.setConnectTimeout(properties.getConnectTimeout())
.setCompression(properties.getCompression().name().toLowerCase(Locale.ROOT));
properties.getHeaders().forEach(builder::addHeader);
//io.opentelemetry.sdk.trace.export.BatchSpanProcessor
return builder.build();
}
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by another