add project to telemetry
Browse files
app.py
CHANGED
@@ -9,6 +9,12 @@ from opentelemetry.sdk.trace import TracerProvider
|
|
9 |
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
10 |
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
11 |
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
PHOENIX_API_KEY = os.getenv("PHOENIX_API_KEY")
|
14 |
api_key = f"api_key={PHOENIX_API_KEY}"
|
|
|
9 |
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
10 |
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
|
11 |
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
12 |
+
from openinference.semconv.resource import ResourceAttributes
|
13 |
+
from opentelemetry.sdk.resources import Resource
|
14 |
+
|
15 |
+
resource = Resource(attributes={
|
16 |
+
ResourceAttributes.PROJECT_NAME: 'hf-parsimony'
|
17 |
+
})
|
18 |
|
19 |
PHOENIX_API_KEY = os.getenv("PHOENIX_API_KEY")
|
20 |
api_key = f"api_key={PHOENIX_API_KEY}"
|