Skip to content

Conversation

@cesarebernardis
Copy link

Closes #2559

Implementation of a new Instrumentor class that supports Open Agent Specification Tracing.

The PR includes the implementation of the new Instrumentor class for Agent Spec, and all the requirements for the introduction and the release of a new Instrumentor as part of OpenInference.

Since pyagentspec==26.1.0 has not been released publicly on the Pypi index yet, it requires to be manually installed from source from https://github.com/oracle/agent-spec. As soon as it will be publicly available, we will perform a new typing check on the code, and the skip_dep_check=True flag setup, currently needed to correctly run examples and tests, will be removed.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 23, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@cesarebernardis
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Dec 23, 2025
@mikeldking mikeldking moved this to In Progress in Instrumentation Dec 23, 2025
Comment on lines +1 to +7
# Changelog

## 0.1.0 (2025-12-24)

### Features

* Agent Spec instrumentation ([#ISSUE_LINK](https://github.com/Arize-ai/openinference/issues/)) ([COMMIT_ID](https://github.com/Arize-ai/openinference/commit/))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this will be auto-generated by release please as long as the conventional commit message is setup.

Comment on lines +62 to +72
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import SimpleSpanProcessor

from openinference.instrumentation.agentspec import AgentSpecInstrumentor

endpoint = "http://127.0.0.1:6006/v1/traces"
tracer_provider = TracerProvider()
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint)))

AgentSpecInstrumentor().instrument(tracer_provider=tracer_provider)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

non-blocking but this is a bit simpler with phoenix-otel if desired. https://pypi.org/project/arize-phoenix-otel/

But for this block probably best to do it this way. https://pypi.org/project/arize-phoenix-otel/

def _to_open_inference_format_tracing_info(
span: AgentSpecSpan, mask_sensitive_information: bool = True
) -> Dict[str, Any]:
# See https://arize.com/docs/ax/concepts/tracing/semantic-conventions for naming conventions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# See https://arize.com/docs/ax/concepts/tracing/semantic-conventions for naming conventions
# See https://arize-ai.github.io/openinference/spec/ for naming conventions

more up to date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

[feature request] Add an Instrumentor for Open Agent Specification

3 participants