Telemetry Channel
Reference for the ahp-otlp: channels — stateless channels that pass OpenTelemetry logs, traces, and metrics from the agent host to subscribed clients as OTLP/JSON payloads. See Telemetry Channel specification for the wire-level overview, including URI templates and severity filtering.
JSON Schema: state.schema.json
State Types
The ahp-otlp: channels are stateless; the only state type is the capability descriptor the host advertises on InitializeResult.telemetry.
TelemetryCapabilities
OTLP telemetry channels the agent host emits.
Each field, when present, is either a literal channel URI or an RFC 6570 URI template a client expands and then subscribes to. Absent fields indicate the host does not emit that signal.
Channel URIs use the ahp-otlp: scheme. The scheme identifies the protocol (OpenTelemetry over AHP) so clients can recognise the channel type by URI alone; the host is free to choose any authority/path that makes sense for its implementation. Clients MUST treat the URI as opaque (apart from expanding any well-known template variables defined below) and subscribe with the resulting concrete URI.
Payloads delivered on these channels are OTLP/JSON values — see opentelemetry-proto for the wire shapes (ExportLogsServiceRequest, ExportTraceServiceRequest, ExportMetricsServiceRequest).
| Field | Type | Required | Description |
|---|---|---|---|
logs | URI | No | Channel URI (or RFC 6570 URI template) for OTLP log records (otlp/exportLogs notifications).The following template variables are defined by this protocol; any other variable name MUST be ignored by clients (there is no protocol-defined way to obtain values for unknown variables): | Variables in template | Meaning | | --------------------- | ------------------------------------------------------------------------------------------------------- | | (none) | The host does not support subscriber-side severity filtering. The template is itself a subscribable URI. | | {level} | Minimum OTLP severity to deliver. Expand to one of the OTLP SeverityNumber short names (case-insensitive): trace, debug, info, warn, error, fatal. The server delivers log records whose severityNumber falls in the corresponding band or above. |Hosts SHOULD honour the expanded {level}; clients MUST still filter defensively in case a host ignores the parameter. Hosts that do not advertise {level} deliver all severities.Future protocol versions MAY add new well-known variables (e.g. scope or attribute filters). |
traces | URI | No | Channel URI for OTLP spans (otlp/exportTraces notifications). No template variables are defined by this protocol version. |
metrics | URI | No | Channel URI for OTLP metric data points (otlp/exportMetrics notifications). No template variables are defined by this protocol version. |
Notifications
JSON Schema: notifications.schema.json
otlp/exportLogs
Delivers a batch of OTLP log records to a client subscribed to the host's logs channel (advertised on TelemetryCapabilities.logs).
The payload field is an OTLP/JSON ExportLogsServiceRequest value verbatim — i.e. an object of shape { resourceLogs: ResourceLogs[] } as defined by opentelemetry-proto. AHP does not redeclare the OTLP type system; clients SHOULD use an OpenTelemetry SDK or schema to parse it.
Like all stateless-channel notifications, this is ephemeral: it is not replayed on reconnect. Subscribers receive only batches emitted after their subscribe succeeds.
| Property | Value |
|---|---|
| Direction | Server → Client |
| Type | Notification |
Parameters:
| Field | Type | Description |
|---|---|---|
channel | URI | Channel URI this notification belongs to (an ahp-otlp: URI advertised on TelemetryCapabilities.logs). |
payload | Record<string, unknown> | OTLP/JSON ExportLogsServiceRequest value. The top-level field is resourceLogs: ResourceLogs[]; nested shapes are defined by opentelemetry-proto and are not redeclared here. |
Example:
{
"jsonrpc": "2.0",
"method": "otlp/exportLogs",
"params": {
"channel": "ahp-otlp://logs",
"payload": { "resourceLogs": [ /* OTLP/JSON ResourceLogs * / ] }
}
}otlp/exportTraces
Delivers a batch of OTLP spans to a client subscribed to the host's traces channel (advertised on TelemetryCapabilities.traces).
The payload field is an OTLP/JSON ExportTraceServiceRequest value verbatim — i.e. an object of shape { resourceSpans: ResourceSpans[] } as defined by opentelemetry-proto.
| Property | Value |
|---|---|
| Direction | Server → Client |
| Type | Notification |
Parameters:
| Field | Type | Description |
|---|---|---|
channel | URI | Channel URI this notification belongs to (an ahp-otlp: URI advertised on TelemetryCapabilities.traces). |
payload | Record<string, unknown> | OTLP/JSON ExportTraceServiceRequest value. The top-level field is resourceSpans: ResourceSpans[]; nested shapes are defined by opentelemetry-proto and are not redeclared here. |
Example:
{
"jsonrpc": "2.0",
"method": "otlp/exportTraces",
"params": {
"channel": "ahp-otlp://traces",
"payload": { "resourceSpans": [ /* OTLP/JSON ResourceSpans * / ] }
}
}otlp/exportMetrics
Delivers a batch of OTLP metric data points to a client subscribed to the host's metrics channel (advertised on TelemetryCapabilities.metrics).
The payload field is an OTLP/JSON ExportMetricsServiceRequest value verbatim — i.e. an object of shape { resourceMetrics: ResourceMetrics[] } as defined by opentelemetry-proto.
| Property | Value |
|---|---|
| Direction | Server → Client |
| Type | Notification |
Parameters:
| Field | Type | Description |
|---|---|---|
channel | URI | Channel URI this notification belongs to (an ahp-otlp: URI advertised on TelemetryCapabilities.metrics). |
payload | Record<string, unknown> | OTLP/JSON ExportMetricsServiceRequest value. The top-level field is resourceMetrics: ResourceMetrics[]; nested shapes are defined by opentelemetry-proto and are not redeclared here. |
Example:
{
"jsonrpc": "2.0",
"method": "otlp/exportMetrics",
"params": {
"channel": "ahp-otlp://metrics",
"payload": { "resourceMetrics": [ /* OTLP/JSON ResourceMetrics * / ] }
}
}