mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
Increasing timeout for telemetry
This commit is contained in:
@@ -41,10 +41,12 @@ class Telemetry:
|
||||
self.ready = False
|
||||
try:
|
||||
telemetry_endpoint = "http://telemetry.crewai.com:4318"
|
||||
self.resource = Resource(attributes={SERVICE_NAME: "crewAI-telemetry"})
|
||||
self.resource = Resource(
|
||||
attributes={SERVICE_NAME: "crewAI-telemetry"},
|
||||
)
|
||||
self.provider = TracerProvider(resource=self.resource)
|
||||
processor = BatchSpanProcessor(
|
||||
OTLPSpanExporter(endpoint=f"{telemetry_endpoint}/v1/traces")
|
||||
OTLPSpanExporter(endpoint=f"{telemetry_endpoint}/v1/traces", timeout=60)
|
||||
)
|
||||
self.provider.add_span_processor(processor)
|
||||
self.ready = True
|
||||
@@ -53,7 +55,10 @@ class Telemetry:
|
||||
|
||||
def set_tracer(self):
|
||||
if self.ready:
|
||||
trace.set_tracer_provider(self.provider)
|
||||
try:
|
||||
trace.set_tracer_provider(self.provider)
|
||||
except Exception:
|
||||
self.ready = False
|
||||
|
||||
def crew_creation(self, crew):
|
||||
"""Records the creation of a crew."""
|
||||
|
||||
Reference in New Issue
Block a user