Compare commits

...

4 Commits

Author SHA1 Message Date
Brandon Hancock (bhancock_ai)
48494e48d8 Merge branch 'main' into brandon/cre-399-otel_sdk_disabled-to-true-but-crewai-still-tries-to-push 2024-10-30 16:35:36 -04:00
Brandon Hancock
1bf65999d3 revert parts to og 2024-10-30 16:35:27 -04:00
Brandon Hancock
c0120e0a41 fix linting 2024-10-30 16:34:54 -04:00
Brandon Hancock
ad6ffe9886 Disable telemetry explicitly 2024-10-30 16:31:44 -04:00

View File

@@ -21,7 +21,7 @@ with suppress_warnings():
from opentelemetry import trace # noqa: E402
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter # noqa: E402
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter # noqa: E402
from opentelemetry.sdk.resources import SERVICE_NAME, Resource # noqa: E402
from opentelemetry.sdk.trace import TracerProvider # noqa: E402
from opentelemetry.sdk.trace.export import BatchSpanProcessor # noqa: E402
@@ -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(