Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recreate graal RetryPolicy issue #6139

Merged
merged 3 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ jobs:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17'
# TODO(jack-berg): Which versions do we need to test? Should we use a matrix scheme?
java-version: '21'
distribution: 'graalvm'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Running test
run: |
echo "GRAALVM_HOME: $GRAALVM_HOME"
echo "JAVA_HOME: $JAVA_HOME"
java --version
gu --version
native-image --version
./gradlew nativeTest

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"name":"io.opentelemetry.sdk.common.export.AutoValue_RetryPolicy",
jack-berg marked this conversation as resolved.
Show resolved Hide resolved
"queryAllDeclaredMethods":true
},
{
"name":"io.opentelemetry.sdk.common.export.RetryPolicy",
"queryAllDeclaredMethods":true
}
]
4 changes: 3 additions & 1 deletion integration-tests/graal/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ sourceSets {
}

dependencies {
implementation(project(path = ":sdk:trace-shaded-deps"))
implementation(project(":sdk:all"))
implementation(project(":sdk:trace-shaded-deps"))
implementation(project(":exporters:otlp:all"))
}

// org.graalvm.buildtools.native pluging requires java 11+ as of version 0.9.26
Expand Down
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();
}
}
Loading