-
Notifications
You must be signed in to change notification settings - Fork 848
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recreate graal RetryPolicy issue (#6139)
- Loading branch information
Showing
5 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
.../META-INF/native-image/io.opentelemetry.opentelemetry-exporter-common/reflect-config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[ | ||
{ | ||
"name":"io.opentelemetry.sdk.common.export.AutoValue_RetryPolicy", | ||
"queryAllDeclaredMethods":true | ||
}, | ||
{ | ||
"name":"io.opentelemetry.sdk.common.export.RetryPolicy", | ||
"queryAllDeclaredMethods":true | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...-tests/graal/src/test/java/io/opentelemetry/integrationtests/graal/InitializeSdkTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.integrationtests.graal; | ||
|
||
import static org.assertj.core.api.Assertions.assertThatCode; | ||
|
||
import io.opentelemetry.exporter.otlp.logs.OtlpGrpcLogRecordExporter; | ||
import io.opentelemetry.exporter.otlp.metrics.OtlpGrpcMetricExporter; | ||
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter; | ||
import io.opentelemetry.sdk.OpenTelemetrySdk; | ||
import io.opentelemetry.sdk.logs.SdkLoggerProvider; | ||
import io.opentelemetry.sdk.logs.export.BatchLogRecordProcessor; | ||
import io.opentelemetry.sdk.metrics.SdkMeterProvider; | ||
import io.opentelemetry.sdk.metrics.export.PeriodicMetricReader; | ||
import io.opentelemetry.sdk.trace.SdkTracerProvider; | ||
import io.opentelemetry.sdk.trace.export.BatchSpanProcessor; | ||
import org.junit.jupiter.api.Test; | ||
|
||
class InitializeSdkTest { | ||
|
||
@Test | ||
void initializeSdk() { | ||
assertThatCode( | ||
() -> { | ||
OpenTelemetrySdk sdk = | ||
OpenTelemetrySdk.builder() | ||
.setTracerProvider( | ||
SdkTracerProvider.builder() | ||
.addSpanProcessor( | ||
BatchSpanProcessor.builder(OtlpGrpcSpanExporter.getDefault()) | ||
.build()) | ||
.build()) | ||
.setMeterProvider( | ||
SdkMeterProvider.builder() | ||
.registerMetricReader( | ||
PeriodicMetricReader.create(OtlpGrpcMetricExporter.getDefault())) | ||
.build()) | ||
.setLoggerProvider( | ||
SdkLoggerProvider.builder() | ||
.addLogRecordProcessor( | ||
BatchLogRecordProcessor.builder( | ||
OtlpGrpcLogRecordExporter.getDefault()) | ||
.build()) | ||
.build()) | ||
.build(); | ||
sdk.close(); | ||
}) | ||
.doesNotThrowAnyException(); | ||
} | ||
} |