MCP gateway references for Observability
Understand the MCP gateway Observability options by using the references for descriptions of each field and the source and type of information that each provides.
MCP gateway router spans for observability
When enabled, the Model Context Protocol (MCP) router, ext_proc, emits trace spans for every request and can export structured logs through Red Hat build of OpenTelemetry.
With traces, you can see one continuous timeline of traffic events across different pods and services. This can help you identify bottlenecks and conduct root-cause analysis.
Spans show one part of the journey. The attributes attached to those spans give you the contextual metadata that you need to have searchable and meaningful traces. The attributes are simple key: value pairs attached to each span.
The MCP gateway uses the following router spans:
| Span | When | Description |
|---|---|---|
|
Every |
Root span. Starts when request headers arrive, ends after response headers are processed. |
|
The request body is parsed |
Routing decision: |
|
Non- |
Pass-through to broker: |
|
|
Full tool call handling including session and server resolution. |
|
Inside |
Queries the broker to resolve which backend MCP server owns the tool. |
|
Inside |
Queries the session cache to look up an existing backend session. |
|
Cache miss during |
Hairpin |
|
After |
Persists the new backend session in the session cache. |
The attributes in the following tables use OpenTelemetry MCP Semantic Conventions.
| Attribute | Source | Description |
|---|---|---|
|
|
HTTP method, |
|
|
Request path, |
|
|
Envoy request ID |
|
JSON-RPC |
MCP method, |
|
JSON-RPC |
Tool name, only for |
|
JSON-RPC |
JSON-RPC request ID |
|
JSON-RPC |
Always "2.0" |
|
JSON-RPC |
Same as |
|
|
Gateway session ID |
|
|
Client IP address |
|
|
Response status code |
| Attribute | Description |
|---|---|
|
MCP method |
|
Routing decision: |
| Attribute | Description |
|---|---|
|
Tool name from the request |
|
Gateway session ID |
|
Resolved backend server name |
|
Resolved backend server hostname |
| Attribute | Description |
|---|---|
|
Error classification, such as |
|
Component that generated the error, such as`ext-proc` |
|
HTTP status code returned |
When there is an error, spans include these attributes.
Custom audit log provider fields
Understand the MCP gateway audit log fields by using the reference table for descriptions of each field and the source and type of information that each provides.
| Field | Source | Description |
|---|---|---|
|
|
The start time of the session |
|
|
The HTTP method of the request, for example, |
|
|
The HTTP request path, including any query parameters |
|
|
The HTTP response status code returned to the client |
|
|
Unique string identifier for tracking the end-to-end request lifecycle |
|
|
W3C Trace Context for cross-system correlation |
|
|
MCP method, such as |
|
|
Tool name after prefix stripping |
|
|
Backend MCP server name |
|
|
MCP session identifier |
|
|
Authenticated user identity, injected by an |
|
|
Total duration of the request in milliseconds, from the start time to the last byte sent |
|
|
The upstream host IP address and port that handled the request |
|
|
Body bytes sent downstream to the client |
|
|
Body bytes received upstream from the client |