Skip to content

Commit 2f17706

Browse files
authored
Merge branch 'main' into cijothomas/tracing-error
2 parents 3334884 + 31b494b commit 2f17706

File tree

2 files changed

+54
-31
lines changed

2 files changed

+54
-31
lines changed

.github/workflows/benchmark.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# This workflow runs a Criterion benchmark on a PR and compares the results against the base branch.
2+
# It is triggered on a PR or a push to main.
3+
#
4+
# The workflow is gated on the presence of the "performance" label on the PR.
5+
#
6+
# The workflow runs on a self-hosted runner pool. We can't use the shared runners for this,
7+
# because they are only permitted to run on the default branch to preserve resources.
8+
#
9+
# In the future, we might like to consider using bencher.dev or the framework used by otel-golang here.
10+
on:
11+
pull_request:
12+
push:
13+
branches:
14+
- main
15+
name: benchmark pull requests
16+
jobs:
17+
runBenchmark:
18+
name: run benchmark
19+
permissions:
20+
pull-requests: write
21+
22+
# If we're running on a PR, use ubuntu-latest - a shared runner. We can't use the self-hosted
23+
# runners on arbitrary PRs, and we don't want to unleash that load on the pool anyway.
24+
# If we're running on main, use the OTEL self-hosted runner pool.
25+
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'self-hosted' }}
26+
if: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'performance')) || github.event_name == 'push' }}
27+
env:
28+
# For PRs, compare against the base branch - e.g., 'main'.
29+
# For pushes to main, compare against the previous commit
30+
BRANCH_NAME: ${{ github.event_name == 'pull_request' && github.base_ref || github.event.before }}
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 10 # Fetch current commit and its parent
35+
- uses: arduino/setup-protoc@v3
36+
with:
37+
repo-token: ${{ secrets.GITHUB_TOKEN }}
38+
- uses: dtolnay/rust-toolchain@master
39+
with:
40+
toolchain: stable
41+
- uses: boa-dev/criterion-compare-action@v3
42+
with:
43+
cwd: opentelemetry
44+
branchName: ${{ env.BRANCH_NAME }}
45+
- uses: boa-dev/criterion-compare-action@v3
46+
with:
47+
cwd: opentelemetry-appender-tracing
48+
features: spec_unstable_logs_enabled
49+
branchName: ${{ env.BRANCH_NAME }}
50+
- uses: boa-dev/criterion-compare-action@v3
51+
with:
52+
cwd: opentelemetry-sdk
53+
features: rt-tokio,testing,metrics,logs,spec_unstable_metrics_views
54+
branchName: ${{ env.BRANCH_NAME }}

.github/workflows/pr_criterion.yaml

-31
This file was deleted.

0 commit comments

Comments
 (0)