API request details export
The export sends one record for each API call through OpenTelemetry (OTel). This page describes how a Groundplex emits the record and what each field of it holds.
How the export emits each record
The export sends one record for each API call, the same record the Monitor API metrics page shows
as API request details. A Groundplex emits it through the OpenTelemetry logs API. Each record carries
the instrumentation scope com.snaplogic.apim.request_log, which lets your tool tell
these records apart from other logs, and a severity of ERROR for a failed call or
INFO for a successful one.
The body of each record is a one-line summary of the request. Every field of the record
also arrives as an attribute of the same name. Nested fields flatten with dots, such as
request_info.caller.client and error_info.error_message,
which tools such as Datadog display as nested again.
To enable the export, refer to Enable OTel export.
Limitations
- The export doesn't send the aggregated metrics behind the API metrics page, such as per-minute request counts or error rates, through the OpenTelemetry metrics signal. Those rollups stay in the SnapLogic UI.
- Enabling the export doesn't change what the
get_api_logAPI returns.
Record structure
The record groups its fields into the following sections.
| Group | Description |
|---|---|
request_info |
What the caller sent: method, URL, path, time, caller identity, and body. |
response_info |
What the API returned: status code, where the status came from, and body. |
error_info |
Which component failed the call, and why. The record carries this group only for a failed call. |
latency_info |
How the call's elapsed time divides between request processing, waiting, the target, and response processing. |
trace_info |
The identifiers that correlate the call with Groundplex and pipeline logs. |
runtime_info |
Which Groundplex node served the call. |
Each record also carries two fields outside those groups: error, which
states whether the call failed, and processing_time, the total elapsed time
of the call.
request_info
Every record carries these fields.
| Field | Description |
|---|---|
method |
The HTTP method of the request. |
url |
The URL the caller requested. |
path_info |
The path of the API, without the version or the Environment. |
time |
When the Groundplex received the request. |
caller.remote_addr |
The IP address the request came from. |
caller.client |
The client that made the request. |
caller.auth_type |
How the caller authenticated, such as Basic or
Bearer. |
caller.roles |
The roles the caller holds. An empty array if the call matched no role. |
body |
The size of the request body, and its content when you enable body export. Refer to Request and response export. |
response_info
Every record carries these fields, whether the target answered the call or the gateway or a rule answered instead.
| Field | Description |
|---|---|
status_code |
The HTTP status code the caller received. |
status_code_type |
Where the status code came from: target when the target
service answered, or request when the gateway or a rule answered instead. |
body |
The size of the response body, and its content when you enable body export. Refer to Request and response export. |
error_info
The record carries this group only for a failed call.
| Field | Description |
|---|---|
error_source |
Which component failed the call: gateway when the gateway
rejected or failed the request, such as a request that matched no route;
policy when a rule rejected
the request or failed while evaluating it; or target when the target
service returned the error. |
error_policy_name |
The display name of the rule that failed the call. |
error_policy |
The ID of the rule that failed the call. |
error_message |
The message the gateway or the rule generated. It never contains a caller payload. |
latency_info
Each value is a duration in milliseconds. The four values sum to
processing_time, which lets you tell a slow target from a slow
gateway.
| Field | Description |
|---|---|
request_ms |
How long the Groundplex spent processing the request before the target call, which includes evaluating the request rules. |
wait_ms |
How long the request waited between the end of request processing and the start
of the target call, such as the time an Ultra request spent in the FeedMaster queue.
0 when the Groundplex called the target straight away. |
target_ms |
How long the target service took to respond. |
response_ms |
How long the Groundplex spent processing the response, which includes evaluating the response rules. |
A call that a rule rejected never reaches the target,
so target_ms and
wait_ms are both 0.
trace_info
These identifiers correlate an API call with the Groundplex and pipeline logs for the same execution, which lets you follow one call from the gateway to the pipeline that served it.
| Field | Description |
|---|---|
xid |
The identifier of the API call. |
ruuid |
The identifier of the pipeline execution that served the call. |
lineage_id |
The identifier shared by every execution the call triggered, which correlates the call across Groundplex nodes, FeedMaster queues, and pipelines. |
runtime_info
These fields identify the node that served the call, which lets you match the record to that node's logs.
| Field | Description |
|---|---|
cc_label |
The label of the Groundplex node that served the call. |
cc_id |
The identifier of the Groundplex node that served the call. |