Disable telemetry explicitly (#1536)

* Disable telemetry explicitly

* fix linting

* revert parts to og
This commit is contained in:
Brandon Hancock (bhancock_ai)
2024-10-30 16:37:21 -04:00
committed by GitHub
parent 55cd15bfc6
commit 6193eb13fa

View File

@@ -48,6 +48,10 @@ class Telemetry:
def __init__(self):
self.ready = False
self.trace_set = False
if os.getenv("OTEL_SDK_DISABLED", "false").lower() == "true":
return
try:
telemetry_endpoint = "https://telemetry.crewai.com:4319"
self.resource = Resource(