Skip to content

Commit 3f6e081

Browse files
authored
fix(server): configure endpoint for OpenTelemetry exporters (#1664)
Previously, the OpenTelemetry metric and log record exporters were initialized without specifying an endpoint. This change sets the endpoint configuration for both exporters to ensure they communicate with the correct server. Without this change, the default endpoint is `localhost`, which won't resolve and thus part of the payload won't be published. This leads to a complete failure of metric/telemetry publishing, and it's the reason why many metrics are not making their way into Jaeger. Making the change and running the docker repository locally proved to me that no more errors were showing up in the log. Next step is bringing it to production
1 parent e348bf4 commit 3f6e081

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jit-binding-server/src/main/kotlin/io/github/typesafegithub/workflows/jitbindingserver/OpenTelemetryConfig.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ internal fun buildOpenTelemetryConfig(
4141
.setTimeout(30, TimeUnit.SECONDS)
4242
.build()
4343

44-
val metricExporter = OtlpGrpcMetricExporter.builder().build()
45-
val recordExporter = OtlpGrpcLogRecordExporter.builder().build()
44+
val metricExporter = OtlpGrpcMetricExporter.builder().setEndpoint(endpointConfig).build()
45+
val recordExporter = OtlpGrpcLogRecordExporter.builder().setEndpoint(endpointConfig).build()
4646

4747
val resource =
4848
Resource

0 commit comments

Comments
 (0)