Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e8a15fc
feat(otel): add the telemetry semantic-conventions registry
pblazej Oct 15, 2026
7f494b9
feat(otel): generate Rust, TypeScript and docs from the registry
pblazej Oct 15, 2026
5b052cb
ci(otel): live-check captures and check the registry in CI
pblazej Oct 15, 2026
e3d3cf5
fix(otel): check metrics and ref overrides on the resolved registry
pblazej Oct 15, 2026
82c2065
fix(otel): recognise durations before aggregation suffixes
pblazej Oct 15, 2026
1b68e73
fix(otel): RTC counters and RTT are not required on a stats window
pblazej Oct 15, 2026
60b057b
fix(otel): require a strictly higher schema_url version
pblazej Oct 15, 2026
1cdb8cc
fix(otel): escape generated literals and doc comments
pblazej Oct 15, 2026
8d6c5ec
feat(otel): flag unregistered lk.* spans in live-check
pblazej Oct 15, 2026
0e8494e
feat(otel): register the client conventions completely
pblazej Oct 15, 2026
54f73a5
docs(otel): generate the conventions spec from the registry
pblazej Oct 15, 2026
a65ef50
feat(otel): check severities, checkpoints and span outcomes in live-c…
pblazej Oct 15, 2026
4abc501
docs(otel): state the conventions as shipped, without open questions
pblazej Oct 15, 2026
75e7497
fix(otel): enforce the policies under --v2 and gate generation
pblazej Oct 15, 2026
cece9e8
fix(otel): the network flags are conditional on the network event
pblazej Oct 15, 2026
67520b5
fix(otel): close three contradictions the live-check rules accepted
pblazej Oct 15, 2026
30b8742
docs(otel): normative stage-1 rules, gauge averages, ms provenance
pblazej Oct 15, 2026
541aa12
fix(otel): an omitted severity text is not a severity violation
pblazej Oct 15, 2026
a87d861
docs(otel): qualify where the RTC milliseconds come from
pblazej Oct 15, 2026
85645ef
docs(otel): note live-check as the SDKs' integration-test gate
pblazej Oct 15, 2026
6721320
feat(otel): register the agents conventions under their current names
pblazej Oct 19, 2026
1a424cf
chore(otel): regenerate Rust, TypeScript, Python and docs
pblazej Oct 19, 2026
5903441
fix(otel): agents review fixes: shipped units, span events, policy al…
pblazej Oct 19, 2026
208c2d7
feat(otel): share track source, disconnect reason and agent name unde…
pblazej Oct 19, 2026
c3ea8d7
fix(otel): record the eight renames in the model and enforce them wha…
pblazej Oct 19, 2026
948b07e
fix(otel): accept --v2 in check.sh without passing it twice
pblazej Oct 19, 2026
4116631
feat(otel): generate the remaining Agents literals from the registry
pblazej Oct 20, 2026
25657ad
refactor(otel): drop the schema version until a producer emits it
pblazej Oct 20, 2026
5a8b62a
chore(otel): point schema_url at this registry
pblazej Oct 20, 2026
38530e9
ci(otel): regenerate otel/gen in the Generate workflow
pblazej Oct 20, 2026
d3f75f4
chore(otel): add a changeset for the telemetry conventions registry
pblazej Oct 20, 2026
044450a
fix(otel): replace otel/gen on generate and catch deleted outputs in CI
pblazej Oct 21, 2026
582b26c
fix(otel): report weaver's error when live-check writes no report
pblazej Oct 21, 2026
e1d0b94
ci(otel): run the committed Python constants
pblazej Oct 21, 2026
f2831d4
fix(otel): apply the attribute rules to every registered key
pblazej Oct 21, 2026
5f7a50a
chore: mark otel/gen as generated
pblazej Oct 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/telemetry-conventions-registry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"github.com/livekit/protocol": patch
"@livekit/protocol": patch
---

Add the telemetry semantic-conventions registry under `otel/`
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
packages/js/src/gen/* linguist-generated
gen_*.* linguist-generated
otel/gen/** linguist-generated
16 changes: 15 additions & 1 deletion .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,23 @@ jobs:
run: |
pnpm --filter @livekit/protocol run generate:proto

# Only the telemetry conventions in otel/ need weaver; the protobuf and JS generation
# above do not. Pinned like otel.yaml, which checks the registry. A failure in this step
# or the next leaves otel/gen as it was and never blocks the protobuf and JS commit
# below; otel.yaml's freshness check fails while otel/gen is stale.
- name: Set up weaver
continue-on-error: true
uses: open-telemetry/weaver/.github/actions/setup-weaver@51a5bf95bdbb2e20fb6e16638e6bbe7dde911e93 # v0.28.0
with:
version: "0.28.0"

- name: Generate the telemetry conventions
continue-on-error: true
run: go tool mage otel

- name: Add changes
uses: EndBug/add-and-commit@645ecc0dd0a57f4d86d26c0aa5fc42c0a856fbca # v11.0.0
with:
add: '["livekit", "replay", "rpc", "infra", "packages/javascript/src/gen"]'
add: '["livekit", "replay", "rpc", "infra", "packages/javascript/src/gen", "otel/gen"]'
default_author: github_actions
message: generated protobuf
69 changes: 69 additions & 0 deletions .github/workflows/otel.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Copyright 2026 LiveKit, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Telemetry conventions

on:
workflow_dispatch:
push:
branches: [main]
paths: ["otel/**", ".github/workflows/otel.yaml"]
pull_request:
branches: [main]
paths: ["otel/**", ".github/workflows/otel.yaml"]

permissions:
contents: read # Checks only read the checkout

jobs:
weaver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: Set up weaver
uses: open-telemetry/weaver/.github/actions/setup-weaver@51a5bf95bdbb2e20fb6e16638e6bbe7dde911e93 # v0.28.0
with:
version: "0.28.0"

- name: Check the registry
run: otel/check.sh

- name: Policy negatives fail with their named finding
run: otel/tests/negatives.sh

# The Generate workflow regenerates otel/gen on every push to a branch and commits any
# change, as it does for the protobuf code. That commit is pushed with the workflow
# token and does not run these checks by itself (GitHub can ask a maintainer to approve
# that run); push again to run them. This check fails a commit whose otel/gen is stale,
# also when a fresh run deletes an output: `git add --all` stages the deletion, and the
# diff compares the index with the commit.
- name: Generated outputs are current
run: |
otel/tests/generate.sh
otel/generate.sh
git add --all otel/gen
git diff --cached --exit-code -- otel/gen

- name: Generated outputs compile
run: |
rustc --edition 2021 --crate-type lib -D warnings -D missing_docs otel/gen/rust/semconv.rs --out-dir "$RUNNER_TEMP"
npx --yes -p typescript@5.9.3 tsc --strict --noEmit --target es2020 otel/gen/ts/semconv.ts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curiously, only rust and ts ? do we need to check the python as well ? or python is using rust under the hood ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agents imports the generated Python directly, not through Rust. In e1d0b94 CI also runs the committed Python file.

python3 -I -W error otel/gen/python/semconv.py

- name: Codegen escapes literals (round-trip through rustc, tsc and python3)
run: otel/tests/codegen.sh

- name: Live-check the smoke sample
run: otel/tests/live-check.sh
7 changes: 7 additions & 0 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,13 @@ func Proto() error {
return nil
}

// regenerate the telemetry conventions in otel/gen (needs weaver, see otel/README.md)
func Otel() error {
cmd := exec.Command("otel/generate.sh")
connectStd(cmd)
return cmd.Run()
}

// run tests
func Test() error {
cmd := exec.Command("go", "test", "-race", "./...")
Expand Down
Loading
Loading