Skip to content

Commit

Permalink
Fix otel startup bug (chroma-core#1263)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
- Fixes
chroma-core#1260 (comment)
- TL;DR the default `chroma_otel_tracing_granularity` ends up set to
`""` which isn't a valid enum value.
 - New functionality
	 - None

## Test plan
*How are these changes tested?*

- CI
- The `docker-compose` startup flow works now

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
  • Loading branch information
beggers authored Oct 19, 2023
1 parent ac644a8 commit 019b954
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chromadb/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def chroma_server_auth_credentials_file_non_empty_file_exists(
chroma_otel_collection_endpoint: Optional[str] = ""
chroma_otel_service_name: Optional[str] = "chromadb"
chroma_otel_collection_headers: Dict[str, str] = {}
chroma_otel_granularity: Optional[str] = "none"
chroma_otel_granularity: Optional[str] = None

allow_reset: bool = False

Expand Down
6 changes: 5 additions & 1 deletion chromadb/telemetry/opentelemetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def __init__(self, system: System):
system.settings.chroma_otel_service_name,
system.settings.chroma_otel_collection_endpoint,
system.settings.chroma_otel_collection_headers,
OpenTelemetryGranularity(system.settings.chroma_otel_granularity),
OpenTelemetryGranularity(
system.settings.chroma_otel_granularity
if system.settings.chroma_otel_granularity
else "none"
),
)


Expand Down

0 comments on commit 019b954

Please sign in to comment.