Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,20 @@ pnpm dev

The server will be available at `http://localhost:3000`.

### OpenTelemetry (GenAI) tracing

`responses.js` emits OpenTelemetry spans for response execution (`gen_ai.operation.name=chat`) and tool execution (`gen_ai.operation.name=execute_tool`).

- Parent trace context is extracted from incoming propagation headers (`traceparent`/`tracestate`), so spans attach to your upstream instrumentation.
- Tool metadata is always traced (`gen_ai.tool.name`, `gen_ai.tool.type`, `gen_ai.tool.call.id`, `mcp.server_label`).
- Tool arguments/results are optional and controlled by:

```bash
OTEL_GENAI_CAPTURE_TOOL_CONTENT=true
```

Set it to `false` (or unset) to avoid collecting tool arguments/results in span attributes.

### Running Examples

Explore the various capabilities with our example scripts located in the [./examples](./examples) folder:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"author": "Hugging Face",
"license": "MIT",
"dependencies": {
"@opentelemetry/api": "^1.9.0",
"@modelcontextprotocol/sdk": "^1.26.0",
"express": "^4.22.1",
"openai": "^5.8.2",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading