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 f4a8aa5bda
commit f7d7b5fe18

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(