From a2c7e46aed7d57a104a2e79d97fba17d506e40df Mon Sep 17 00:00:00 2001 From: Alexander Song Date: Fri, 17 Jan 2025 13:00:02 -0800 Subject: [PATCH] commit notes --- .../examples/tracer.ipynb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/python/openinference-instrumentation/examples/tracer.ipynb b/python/openinference-instrumentation/examples/tracer.ipynb index 082411427..e41dc771a 100644 --- a/python/openinference-instrumentation/examples/tracer.ipynb +++ b/python/openinference-instrumentation/examples/tracer.ipynb @@ -15,7 +15,7 @@ "Proposed imports:\n", "\n", "```python\n", - "from openinference.semconv.trace import (\n", + "from openinference.instrumentation import (\n", " get_input_value_and_mime_type,\n", " get_openinference_span_kind,\n", " get_output_value_and_mime_type,\n", @@ -43,11 +43,12 @@ "\n", "from openinference.instrumentation import using_attributes\n", "from openinference.instrumentation.config import (\n", - " OpenInferenceTracerProvider,\n", + " # imagine these imports are different\n", + " OpenInferenceTracerProvider, # rename to TracerProvider\n", " chain,\n", - " get_current_openinference_span,\n", + " get_current_openinference_span, # rename to get_current_span\n", " get_input_value_and_mime_type,\n", - " get_openinference_span_kind,\n", + " get_openinference_span_kind, # rename to get_span_kind\n", " get_output_value_and_mime_type,\n", " get_tool_attributes,\n", " suppress_tracing,\n", @@ -67,7 +68,7 @@ "tracer_provider = OpenInferenceTracerProvider(resource=resource)\n", "tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint)))\n", "tracer_provider.add_span_processor(SimpleSpanProcessor(ConsoleSpanExporter()))\n", - "set_tracer_provider(tracer_provider)\n", + "# set_tracer_provider(tracer_provider)\n", "tracer = tracer_provider.get_tracer(__name__)" ] }, @@ -489,6 +490,7 @@ " name=\"tool-name\",\n", " description=\"tool-description\",\n", " parameters={\"input\": \"input\"},\n", + " id=\"1234\",\n", " )\n", " )\n", " span.set_status(Status(StatusCode.OK))" @@ -500,7 +502,7 @@ "metadata": {}, "outputs": [], "source": [ - "@tool\n", + "@tool(parameters=\"\")\n", "def decorated_tool(input1: str, input2: int) -> None:\n", " \"\"\"\n", " tool-description\n",