Repository navigation
feat(telemetry): add the crate with its event model and OTLP encoding #1479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
205ab30
fc0ef58
2716873
6271ffe
0424f50
0f95504
b559dab
b417592
94107d2
126996b
775b105
87f13dd
e6c2d3f
ec9508a
5599155
182e545
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Changelog |
| 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" | ||
| 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" | ||
| 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: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm sure you've considered this, but what's the downside of having this data model declared in protocol as shared protos?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| - **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. | ||
Uh oh!
There was an error while loading. Please reload this page.