Skip to content

Commit 1f37c5f

Browse files
Merge branch 'main' into async_re_aggregation
2 parents cd05ef8 + 356fc9e commit 1f37c5f

File tree

157 files changed

+4654
-2541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+4654
-2541
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.2.1
1+
8.5.0

.bcr/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# BCR Publishing Configuration
2+
3+
This directory contains the template files required for publishing opentelemetry-cpp to the [Bazel Central Registry (BCR)](https://github.com/bazelbuild/bazel-central-registry).
4+
5+
## Files
6+
7+
### metadata.template.json
8+
Contains the module metadata including homepage, maintainers, and repository information. This is used to create/update the BCR metadata for the module.
9+
10+
### source.template.json
11+
Defines the source archive location and format. Placeholders like `{OWNER}`, `{REPO}`, `{TAG}`, and `{VERSION}` are automatically replaced during publishing.
12+
13+
### presubmit.yml
14+
Defines the BCR presubmit tests that run when a new version is published. Currently configured to test on:
15+
- Platforms: debian10, macos, ubuntu2004, windows
16+
- Bazel versions: 7.x, 8.x, 9.*
17+
18+
## Publishing Process
19+
20+
The publish-to-bcr workflow (`.github/workflows/publish-to-bcr.yml`) automates publishing to BCR.
21+
22+
### Prerequisites
23+
24+
**Create a Personal Access Token (PAT)**:
25+
- Create a Classic PAT with `workflow` and `repo` permissions
26+
- Add it as a secret named `BCR_PUBLISH_TOKEN` in repository settings
27+
28+
### How to Publish
29+
30+
The workflow can be triggered in two ways:
31+
32+
1. **Automatically**: When a new GitHub release is published
33+
2. **Manually**: Via workflow dispatch in GitHub Actions UI
34+
- Go to Actions → Publish to BCR → Run workflow
35+
- Enter the tag name (e.g., `v1.24.0`)
36+
37+
### What Happens
38+
39+
When triggered, the workflow:
40+
1. Generates a BCR entry using these templates
41+
2. Pushes the entry to your BCR fork
42+
3. Opens a pull request against the upstream BCR
43+
44+
### Using a Fork Registry
45+
46+
For development and testing, you can use a fork of the Bazel Central Registry:
47+
48+
1. Fork https://github.com/bazelbuild/bazel-central-registry
49+
2. Configure your fork URL in the workflow (modify the `publish-to-bcr.yml` file)
50+
3. Test changes in your fork before submitting to the official BCR
51+
52+
The configuration in this repository points to the **official** Bazel Central Registry at https://github.com/bazelbuild/bazel-central-registry. However, using a fork registry is recommended for testing and development to avoid polluting the official registry during experimentation.
53+
54+
## References
55+
56+
- [Publish to BCR Action](https://github.com/bazel-contrib/publish-to-bcr)
57+
- [Bazel Central Registry](https://github.com/bazelbuild/bazel-central-registry)
58+
- [BCR Module: opentelemetry-cpp](https://github.com/bazelbuild/bazel-central-registry/tree/main/modules/opentelemetry-cpp)

.bcr/metadata.template.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"homepage": "https://github.com/open-telemetry/opentelemetry-cpp",
3+
"maintainers": [
4+
{
5+
"name": "Keith Smiley",
6+
"email": "keithbsmiley@gmail.com",
7+
"github": "keith",
8+
"github_user_id": 283886
9+
},
10+
{
11+
"name": "Marc Alff",
12+
"email": "marc.alff@oracle.com",
13+
"github": "marcalff",
14+
"github_user_id": 17238896
15+
}
16+
],
17+
"repository": [
18+
"github:open-telemetry/opentelemetry-cpp"
19+
],
20+
"versions": [],
21+
"yanked_versions": {}
22+
}

.bcr/presubmit.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
matrix:
4+
platform: ["debian10", "macos", "ubuntu2004", "windows"]
5+
bazel: ["7.x", "8.x", "9.*"]
6+
tasks:
7+
verify_targets:
8+
platform: ${{ platform }}
9+
bazel: ${{ bazel }}
10+
build_flags:
11+
- '--cxxopt=-std=c++14'
12+
- '--host_cxxopt=-std=c++14'
13+
build_targets:
14+
- '@opentelemetry-cpp//api'

.bcr/source.template.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"integrity": "",
3+
"strip_prefix": "opentelemetry-cpp-{VERSION}",
4+
"url": "https://github.com/{OWNER}/{REPO}/archive/refs/tags/{TAG}.tar.gz"
5+
}

.clang-tidy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ Checks: >
3535
-cppcoreguidelines-avoid-do-while,
3636
-cppcoreguidelines-avoid-c-arrays,
3737
-cppcoreguidelines-avoid-magic-numbers,
38-
-cppcoreguidelines-init-variables,
3938
-cppcoreguidelines-macro-usage,
4039
-cppcoreguidelines-non-private-member-variables-in-classes,
4140
-cppcoreguidelines-avoid-non-const-global-variables,
42-
-cppcoreguidelines-pro-*
41+
-cppcoreguidelines-pro-*

.clomonitor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
3+
# see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions
4+
exemptions:
5+
- check: artifacthub_badge
6+
reason: "Artifact Hub doesn't support c++ packages"

.devcontainer/Dockerfile.dev

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ COPY ci /opt/ci
1515

1616
RUN apt update && apt install -y wget \
1717
ninja-build \
18-
llvm-dev \
19-
libclang-dev \
20-
clang-tidy \
18+
llvm-20-dev \
19+
libclang-20-dev \
20+
clang-tidy-20 \
2121
shellcheck \
2222
sudo \
2323
cmake
2424

25+
RUN update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-20 200 && \
26+
update-alternatives --install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-20 200 && \
27+
update-alternatives --config clang-tidy && \
28+
update-alternatives --config llvm-config
29+
2530
RUN cd /opt/ci && bash setup_ci_environment.sh
2631
RUN cd /opt/ci && bash install_iwyu.sh
2732

.github/workflows/benchmark.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Harden the runner (Audit all outbound calls)
16-
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
16+
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
1717
with:
1818
egress-policy: audit
1919

20-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
2222
submodules: 'recursive'
2323
- name: Mount Bazel Cache
24-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
24+
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
2525
env:
2626
cache-name: bazel_cache
2727
with:
@@ -55,12 +55,12 @@ jobs:
5555
runs-on: ubuntu-latest
5656
steps:
5757
- name: Harden the runner (Audit all outbound calls)
58-
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
58+
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
5959
with:
6060
egress-policy: audit
6161

62-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
63-
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # main March 2025
62+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
63+
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # main March 2025
6464
with:
6565
name: benchmark_results
6666
path: benchmarks

0 commit comments

Comments
 (0)