From 7017cc875e8d6b38c75b981eeb17f1e518a6823e Mon Sep 17 00:00:00 2001 From: Jack Berg Date: Wed, 10 Jan 2024 17:14:27 -0600 Subject: [PATCH] Add export common reflect config to fix native image compilation --- .github/workflows/build.yml | 1 + .../reflect-config.json | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 exporters/common/src/main/resources/META-INF/native-image/io.opentelemetry.opentelemetry-exporter-common/reflect-config.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2a9bdbeaeb..210f70e2ff7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -136,6 +136,7 @@ jobs: - uses: actions/checkout@v4 - uses: graalvm/setup-graalvm@v1 with: + # TODO(jack-berg): Which versions do we need to test? Should we use a matrix scheme? java-version: '21' distribution: 'graalvm' components: 'native-image' diff --git a/exporters/common/src/main/resources/META-INF/native-image/io.opentelemetry.opentelemetry-exporter-common/reflect-config.json b/exporters/common/src/main/resources/META-INF/native-image/io.opentelemetry.opentelemetry-exporter-common/reflect-config.json new file mode 100644 index 00000000000..033ccf44f0c --- /dev/null +++ b/exporters/common/src/main/resources/META-INF/native-image/io.opentelemetry.opentelemetry-exporter-common/reflect-config.json @@ -0,0 +1,10 @@ +[ + { + "name":"io.opentelemetry.sdk.common.export.AutoValue_RetryPolicy", + "queryAllDeclaredMethods":true + }, + { + "name":"io.opentelemetry.sdk.common.export.RetryPolicy", + "queryAllDeclaredMethods":true + } +]