diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 20b28f64be..08d6efb1b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,28 @@ jobs: - run: java -cp sdk-usage/build/libs/opentelemetry-examples-sdk-usage-0.1.0-SNAPSHOT-all.jar io.opentelemetry.sdk.example.ConfigureSpanProcessorExample + test-declarative-configuration-run: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - name: Set up JDK for running Gradle + uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1 + with: + distribution: temurin + java-version: 17 + + - name: Set up gradle + uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1 + with: + cache-read-only: ${{ github.event_name == 'pull_request' }} + + - name: Run declarative-configuration + working-directory: declarative-configuration + run: | + export OTEL_EXPERIMENTAL_CONFIG_FILE=$(pwd)/otel-sdk-config.yaml + ../gradlew run + # this is not a required check to avoid blocking pull requests if external links break markdown-link-check: uses: ./.github/workflows/reusable-markdown-link-check.yml @@ -49,8 +71,11 @@ jobs: required-status-check: needs: - build + - test-declarative-configuration-run runs-on: ubuntu-latest if: always() steps: - - if: needs.build.result != 'success' - run: exit 1 + - if: > + needs.build.result != 'success' || + needs.test-declarative-configuration-run.result != 'success' + run: exit 1 \ No newline at end of file diff --git a/declarative-configuration/otel-sdk-config.yaml b/declarative-configuration/otel-sdk-config.yaml index 5b671e1ebd..6ee050d1b6 100644 --- a/declarative-configuration/otel-sdk-config.yaml +++ b/declarative-configuration/otel-sdk-config.yaml @@ -1,12 +1,17 @@ # See https://github.com/open-telemetry/opentelemetry-configuration for details on schema and examples -file_format: "0.3" +file_format: "1.0-rc.1" resource: attributes: - name: service.name value: file-configuration-example +propagator: + composite: + - tracecontext: + - baggage: + tracer_provider: processors: - batch: @@ -23,9 +28,4 @@ meter_provider: instrument_type: histogram stream: aggregation: - drop: - -propagator: - composite: - - tracecontext - - baggage + drop: \ No newline at end of file