Skip to content

Commit 6d0cce1

Browse files
committed
Switch to OTLP/proto exporter and report test metrics during after test runs
1 parent 74881b6 commit 6d0cce1

File tree

10 files changed

+16416
-251
lines changed

10 files changed

+16416
-251
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -44,42 +44,22 @@ jobs:
4444
id: npm-ci-test
4545
run: npm run ci-test
4646

47-
test-action:
48-
name: GitHub Actions Test
49-
runs-on: ubuntu-latest
50-
51-
steps:
52-
- name: Checkout
53-
id: checkout
54-
uses: actions/checkout@v4
55-
56-
- name: Create Test JUnit XML
57-
id: create-junit
58-
run: |
59-
mkdir -p test-results
60-
cat > test-results/test-results.xml << 'EOF'
61-
<?xml version="1.0" encoding="UTF-8"?>
62-
<testsuites name="CI Test Suite" tests="3" failures="1" errors="0" skipped="0" time="5.123">
63-
<testsuite name="ExampleTests" tests="3" failures="1" errors="0" skipped="0" time="5.123">
64-
<testcase name="test_success" classname="ExampleTests" time="1.234"/>
65-
<testcase name="test_failure" classname="ExampleTests" time="2.345">
66-
<failure message="Assertion failed">Test failed as expected</failure>
67-
</testcase>
68-
<testcase name="test_another_success" classname="ExampleTests" time="1.544"/>
69-
</testsuite>
70-
</testsuites>
71-
EOF
72-
73-
- name: Test Local Action
74-
id: test-action
47+
- name: Self Report Metrics
48+
id: self-report-metrics
7549
uses: ./
7650
with:
7751
junit-xml-folder: 'test-results'
78-
service-name: 'ci-test-service'
79-
service-namespace: 'github-actions'
52+
service-name: 'cae-otel-ci-visibility'
53+
service-namespace: 'redis'
54+
service-version: '1.0.0-dev'
8055
deployment-environment: 'ci'
81-
otlp-endpoint: 'http://localhost:4318/v1/metrics'
82-
otlp-headers: 'x-test-header=ci-test'
56+
otlp-endpoint: 'https://otlp-gateway-prod-us-central-0.grafana.net/otlp/v1/metrics'
57+
otlp-headers:
58+
'{"Authorization": "Basic ${{
59+
secrets.SELF_CHECK_OTEL_AUTHORIZATION_TOKEN}}"}'
60+
env:
61+
OTEL_EXPORTER_OTLP_PROTOCOL: 'http/protobuf'
62+
ACTIONS_STEP_DEBUG: 'false'
8363

8464
- name: Verify Test Results
8565
id: verify

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ typings/
7171
# dotenv environment variables file
7272
.env
7373
.env.test
74-
74+
.env.self-check
7575
# parcel-bundler cache (https://parceljs.org/)
7676
.cache
7777

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ Extracts test metrics from JUnit XML files and ships them to OTLP endpoints.
77
- Reads JUnit XML files from a directory
88
- Parses test results (passed/failed/skipped/errors)
99
- Generates OpenTelemetry metrics with proper semantic conventions
10-
- Ships metrics to OTLP-compatible backends. HTTP only for now, gRPC support
11-
coming soon.
10+
- Ships metrics to OTLP-compatible backends
1211

1312
## Usage
1413

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)