feat(tvix/tracing): introduce common tvix-tracing crate

Introduce a new common crate that contains tracing boilerplate which then
can be used in the cli, tvix-store and tvix-build crates.
It has otlp as an optional feature, which is currently only used by
tvix-store.

Change-Id: I41468ac4d9c65174515d721513b96fea463d6ed2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11758
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Autosubmit: Simon Hauser <simon.hauser@helsinki-systems.de>
This commit is contained in:
Simon Hauser 2024-06-06 15:44:11 +02:00 committed by clbot
parent 11a6ff7706
commit 825d498908
15 changed files with 271 additions and 203 deletions

View file

@ -198,14 +198,9 @@ logs etc, but this is something requiring a lot of designing.
- Some work ongoing on the worker operation parsing (griff, picnoir)
### O11Y
- `[tracing-]indicatif` for progress/log reporting (cl/11747)
- Currently there's a lot of boilerplate in the `tvix-store` CLI entrypoint,
and half of the boilerplate copied over to `tvix-cli`.
Setup of the tracing things should be unified into the `tvix-tracing` crate,
maybe including some of the CLI parameters (@simon).
Or maybe drop `--log-level` entirely, and only use `RUST_LOG` env
exclusively? `debug`,`trace` level across all crates is a bit useless, and
`RUST_LOG` can be much more granular…
- Maybe drop `--log-level` entirely, and only use `RUST_LOG` env exclusively?
`debug`,`trace` level across all crates is a bit useless, and `RUST_LOG` can
be much more granular…
- The OTLP stack is quite spammy if there's no OTLP collector running on
localhost.
https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/