[CLN] Make telemetry a no-op#6362
[CLN] Make telemetry a no-op#6362kylediaz wants to merge 4 commits intokylediaz02-24-_tst_make_pytest_use_importlibfrom
Conversation
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
1837f41 to
4014cd8
Compare
|
Found 5 test failures on Blacksmith runners: Failures
|
There was a problem hiding this comment.
Telemetry cleanup is nearly complete; remove redundant class and empty module for clarity.
Status: Minor Suggestions | Risk: Low
Issues Identified & Suggestions
- Remove redundant NoOp class, use base directly:
chromadb/telemetry/product/__init__.py - Delete emptied telemetry module to avoid dead stub:
chromadb/telemetry/product/posthog.py
Review Details
📁 10 files reviewed | 💬 2 comments
👍 / 👎 individual comments to help improve reviews for you
| except Exception: | ||
| self._curr_user_id = self.UNKNOWN_USER_ID | ||
| return self._curr_user_id | ||
| class NoOpProductTelemetryClient(ProductTelemetryClient): |
There was a problem hiding this comment.
[Maintainability] The ProductTelemetryClient class is now a concrete implementation that performs no operations (since the abstract method decorator was removed). This makes NoOpProductTelemetryClient redundant as it simply overrides the method with the same no-op behavior.
Since you are updating the configuration to point to a NoOp implementation anyway, you can simplify the architecture by:
- Removing
NoOpProductTelemetryCliententirely. - Using
ProductTelemetryClientdirectly in the configuration default.
This reduces boilerplate and keeps the class hierarchy cleaner.
Context for Agents
The `ProductTelemetryClient` class is now a concrete implementation that performs no operations (since the abstract method decorator was removed). This makes `NoOpProductTelemetryClient` redundant as it simply overrides the method with the same no-op behavior.
Since you are updating the configuration to point to a NoOp implementation anyway, you can simplify the architecture by:
1. Removing `NoOpProductTelemetryClient` entirely.
2. Using `ProductTelemetryClient` directly in the configuration default.
This reduces boilerplate and keeps the class hierarchy cleaner.
File: chromadb/telemetry/product/__init__.py
Line: 42
#6469
We do not collect telemetry anymore. This removes posthog as a dependency and makes the product telemetry impl a no-op.
I want to say on our docs that we do not collect telemetry, and I feel removing this instrumentation is a prerequisite.