Update crew.py
Browse files
crew.py
CHANGED
|
@@ -18,6 +18,22 @@ tracer_provider = register(
|
|
| 18 |
project_name="gaia"
|
| 19 |
)
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
#agentops.init(os.environ["AGENTOPS_API_KEY"])
|
| 22 |
|
| 23 |
def get_crew():
|
|
|
|
| 18 |
project_name="gaia"
|
| 19 |
)
|
| 20 |
|
| 21 |
+
###
|
| 22 |
+
#from opentelemetry import trace
|
| 23 |
+
#from opentelemetry.sdk.trace import TracerProvider
|
| 24 |
+
#from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
| 25 |
+
|
| 26 |
+
from openinference.instrumentation.crewai import CrewAIInstrumentor
|
| 27 |
+
#from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
| 28 |
+
#from opentelemetry.sdk.trace.export import ConsoleSpanExporter, SimpleSpanProcessor
|
| 29 |
+
|
| 30 |
+
#endpoint = "https://app.phoenix.arize.com"
|
| 31 |
+
#trace_provider = TracerProvider()
|
| 32 |
+
#trace_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint)))
|
| 33 |
+
|
| 34 |
+
CrewAIInstrumentor().instrument(tracer_provider=tracer_provider)
|
| 35 |
+
###
|
| 36 |
+
|
| 37 |
#agentops.init(os.environ["AGENTOPS_API_KEY"])
|
| 38 |
|
| 39 |
def get_crew():
|