Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/add-livekit-telemetry-crate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
livekit-telemetry: minor
---

Add `livekit-telemetry`, the internal client telemetry core shared by the LiveKit client SDKs.
51 changes: 51 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ members = [
"livekit-ffi",
"livekit-uniffi",
"livekit-datatrack",
"livekit-telemetry",
"livekit-token",
"livekit-token-source",
"livekit-ffi-node-bindings",
Expand Down Expand Up @@ -60,6 +61,7 @@ livekit-api = { version = "0.8.1", path = "livekit-api" }
livekit-capture = { version = "0.1.3", path = "livekit-capture" }
livekit-ffi = { version = "0.12.81", path = "livekit-ffi" }
livekit-datatrack = { version = "0.2.1", path = "livekit-datatrack" }
livekit-telemetry = { version = "0.1.0", path = "livekit-telemetry" }
livekit-signaling = { version = "0.1.4", path = "livekit-signaling" }
livekit-token = { version = "0.2.1", path = "livekit-token" }
livekit-token-source = { version = "0.1.3", path = "livekit-token-source" }
Expand Down
8 changes: 8 additions & 0 deletions knope.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ versioned_files = [
]
changelog = "livekit-datatrack/CHANGELOG.md"

[packages.livekit-telemetry]
versioned_files = [
"livekit-telemetry/Cargo.toml",
"Cargo.lock",
{ path = "Cargo.toml", dependency = "livekit-telemetry" },
]
changelog = "livekit-telemetry/CHANGELOG.md"

[packages.livekit-common]
versioned_files = [
"livekit-common/Cargo.toml",
Expand Down
1 change: 1 addition & 0 deletions livekit-telemetry/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
25 changes: 25 additions & 0 deletions livekit-telemetry/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[package]
name = "livekit-telemetry"
description = "Client telemetry core for LiveKit: buffers events on-device and exports them as OTLP"
version = "0.1.0"
readme = "README.md"
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.
license.workspace = true
edition.workspace = true
repository.workspace = true

[dependencies]
log = { workspace = true }
prost = { workspace = true }
rand = { workspace = true }
# OTLP message types only (`gen-tonic-messages` = prost structs, no tonic). Same prost as
# livekit-protocol so a single prost is linked.
opentelemetry-proto = { version = "0.32", default-features = false, features = ["logs", "trace", "gen-tonic-messages"] }
uniffi = { workspace = true, features = ["scaffolding-ffi-buffer-fns"], optional = true }

[features]
uniffi = ["dep:uniffi"]

# How CI checks this crate's features, read by
# `.github/workflows/feature-combinations-curated.yml` via `cargo metadata`.
[package.metadata.feature-combinations]
mode = "powerset"
19 changes: 19 additions & 0 deletions livekit-telemetry/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# LiveKit Telemetry

**Important**:
This is an internal crate for client telemetry in LiveKit client SDKs and is not meant to be
used directly.

It currently holds the shared data model and its encoding:

- **Records.** `TelemetryEvent`, `LogRecord`, `Attribute` / `AttributeValue`, `Severity` and
`SpanOutcome`: the events, log lines and span outcomes a platform SDK hands over.
- **Buffers.** Bounded, drop-oldest queues for records and spans, each filed under the session
(trace) it belongs to; every drop is counted.
- **Encoding.** [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/) protobuf logs and traces,
using the `opentelemetry-proto` message types only (no gRPC stack).

The pipeline that batches, caches and uploads records is not part of the crate yet.

Event names, attributes and span rules are defined in [`SPEC.md`](SPEC.md). It is the contract
for the whole crate, including the parts not implemented yet.
Loading
Loading