Skip to content

Commit

Permalink
fix: Support OLTP metric configuration in Vertex #287 (#288)
Browse files Browse the repository at this point in the history
Co-authored-by: Aliaksandr Stsiapanay <[email protected]>
  • Loading branch information
astsiapanay and astsiapanay authored Mar 25, 2024
1 parent b6d6448 commit 2e74971
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/epam/aidial/core/AiDial.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.epam.aidial.core.upstream.UpstreamBalancer;
import com.epam.deltix.gflog.core.LogConfigurator;
import com.google.common.annotations.VisibleForTesting;
import io.micrometer.core.instrument.Clock;
import io.micrometer.registry.otlp.OtlpMeterRegistry;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk;
Expand Down Expand Up @@ -274,7 +275,7 @@ private static void setupMetrics(VertxOptions options) {
}

MicrometerMetricsOptions micrometer = new MicrometerMetricsOptions(metrics.toJson());
micrometer.setMicrometerRegistry(new OtlpMeterRegistry());
micrometer.setMicrometerRegistry(new OtlpMeterRegistry(oltp::getString, Clock.SYSTEM));

options.setMetricsOptions(micrometer);
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/aidial.settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
}
},
"oltpOptions": {
"enabled": false
"enabled": false,
"otlp.url": ""
}
}
},
Expand Down

0 comments on commit 2e74971

Please sign in to comment.