chroma-core / chroma-core/chroma
[Bug]: Open Telemetry is configured when environment variables are blank
- Dominant language
- Rust
- Stars
- 29.3k
- Forks
- 2.5k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 38
Description
### What happened?
When starting the server with `chroma run /config.yaml`, Open Telemetry exporting is started if the following environment variables are set to blank values:
```
CHROMA_OPEN_TELEMETRY__ENDPOINT=""
CHROMA_OPEN_TELEMETRY__SERVICE_NAME=""
```
With the endpoint being blank, the following error occurs:
```
server-1 | thread 'main' panicked at rust/tracing/src/init_tracer.rs:69:10:
server-1 | could not build span exporter for tracing: ExportFailed(InvalidUri(InvalidUri(Empty)))
server-1 | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
We'd expect that the variables being blank starts with open telemetry disabled the same way as if the variables are unset:
```
server-1 | OpenTelemetry is not enabled because it is missing from the config.
server-1 | Listening on 0.0.0.0:8000
```
### Versions
Chroma v1.0.10
### Relevant log output
```shell
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in rust/tracing/src/init_tracer.rs around line 69 and inspect how CHROMA_OPEN_TELEMETRY__ENDPOINT and CHROMA_OPEN_TELEMETRY__SERVICE_NAME are interpreted. Reproduce startup with both variables set to empty strings, then verify it follows the existing disabled behavior for unset variables without panicking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100