enable OTLP export

This commit is contained in:
Jonathan Klabunde Tomer
2025-07-28 14:42:37 -07:00
committed by GitHub
parent 4f0337021c
commit 8aa408a3c1
9 changed files with 98 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.whispersystems.textsecuregcm.configuration.OpenTelemetryConfiguration;
import org.whispersystems.textsecuregcm.metrics.NoopAwsSdkMetricPublisher;
import org.whispersystems.textsecuregcm.storage.DynamoDbExtension;
import org.whispersystems.textsecuregcm.storage.DynamoDbExtensionSchema;
@@ -176,6 +177,13 @@ class WhisperServerServiceTest {
.build());
}
@Test
void testOtlpConfig() {
final OpenTelemetryConfiguration otelConfig =EXTENSION.getConfiguration().getOpenTelemetryConfiguration();
assertTrue(otelConfig.enabled());
assertEquals("http://127.0.0.1:4318/", otelConfig.url());
}
private static DynamoDbClient getDynamoDbClient() {
final AwsCredentialsProvider awsCredentialsProvider = EXTENSION.getConfiguration().getAwsCredentialsConfiguration()
.build();