Skip to main content

OpenTelemetry payload reference

To set up the webhook that sends this payload, see Export with OpenTelemetry.

The OpenTelemetry webhook sends each result to your platform as an OpenTelemetry trace over OTLP/HTTP. A result for one Monitor produces one Monitor span and six timing spans. A result for a Workflow is described in Workflow spans. The OpenTelemetry (Conformance Events) webhook sends log records instead, described in Conformance Events.

The example below is the OTLP JSON form of the Monitor span for one result. The names and types are the ones the exporter sends. The values are illustrative, and the certificate is shortened.

{
"resourceSpans": [
{
"resource": {
"attributes": [
{ "key": "service.name", "value": { "stringValue": "APImetrics" } }
]
},
"scopeSpans": [
{
"scope": {
"name": "Example API status"
},
"spans": [
{
"traceId": "8a4439de8699e4a4a5f868d81a000640",
"spanId": "dfbc5e6391b72526",
"name": "Example API status",
"kind": 1,
"startTimeUnixNano": "1793525400000000000",
"endTimeUnixNano": "1793525400134000000",
"attributes": [
{ "key": "http.route", "value": { "stringValue": "https://api.example.com/v1/status" } },
{ "key": "http.request.method", "value": { "stringValue": "GET" } },
{ "key": "url.full", "value": { "stringValue": "https://api.example.com/v1/status" } },
{ "key": "http.response.status_code", "value": { "intValue": "200" } },
{ "key": "apimetrics_org_id", "value": { "stringValue": "EXAMPLE_ORG_ID" } },
{ "key": "apimetrics_project_id", "value": { "stringValue": "EXAMPLE_PROJECT_ID" } },
{ "key": "apimetrics_project_name", "value": { "stringValue": "Example Project" } },
{ "key": "apimetrics_call_id", "value": { "stringValue": "EXAMPLE_MONITOR_ID" } },
{ "key": "apimetrics_call_name", "value": { "stringValue": "Example API status" } },
{ "key": "apimetrics_result_id", "value": { "stringValue": "EXAMPLE_RESULT_ID" } },
{ "key": "apimetrics_agent_id", "value": { "stringValue": "apimetrics_azurenorwayeast" } },
{ "key": "apimetrics_cloud", "value": { "stringValue": "Azure" } },
{ "key": "client.address", "value": { "stringValue": "203.0.113.10" } },
{ "key": "apimetrics_city", "value": { "stringValue": "Oslo" } },
{ "key": "apimetrics_region", "value": { "stringValue": "Oslo" } },
{ "key": "apimetrics_country", "value": { "stringValue": "Norway" } },
{ "key": "apimetrics_continent", "value": { "stringValue": "Europe" } },
{ "key": "apimetrics_latitude", "value": { "doubleValue": 59.9139 } },
{ "key": "apimetrics_longitude", "value": { "doubleValue": 10.7522 } },
{ "key": "tls.protocol.name", "value": { "stringValue": "TLS" } },
{ "key": "tls.protocol.version", "value": { "stringValue": "1.3" } },
{ "key": "tls.cipher", "value": { "stringValue": "TLS_AES_128_GCM_SHA256" } },
{ "key": "tls.next_protocol", "value": { "stringValue": "h2" } },
{
"key": "tls.server.certificate_chain",
"value": {
"arrayValue": {
"values": [
{
"stringValue": "-----BEGIN CERTIFICATE-----\nMIIB...\n-----END CERTIFICATE-----"
}
]
}
}
},
{ "key": "tls.server.issuer", "value": { "stringValue": "CN=Example CA R1,O=Example CA" } },
{ "key": "tls.server.subject", "value": { "stringValue": "CN=api.example.com" } },
{ "key": "tls.server.not_before", "value": { "stringValue": "2026-09-01T00:00:00+00:00" } },
{ "key": "tls.server.not_after", "value": { "stringValue": "2026-11-30T00:00:00+00:00" } },
{ "key": "tls.server.hash.md5", "value": { "stringValue": "2F127B4B8170CFA17349669CC5A5D9B5" } },
{ "key": "tls.server.hash.sha1", "value": { "stringValue": "A5499D20CD1D03665FE38DFABAE0BEDBEB1F7025" } },
{ "key": "tls.server.hash.sha256", "value": { "stringValue": "DE802211979E5AF048501B36DB6D8FDDF2F86E33CF671B770F67094C05A1F587" } }
]
}
]
}
]
}
]
}

Your platform may display these fields differently, for example by flattening attributes into key = value pairs. The attribute names are always the ones listed below.

Resource and scope​

FieldValue
resource.attributes["service.name"]APImetrics. This is the only resource attribute.
scope.nameThe name of the Monitor. For a Workflow span, the name of the Workflow.

Span fields​

FieldTypeDescription
nameStringThe name of the Monitor for the Monitor span. For a timing span, one of the names in Timing spans.
kindIntegerAlways 1 (internal).
traceIdStringA unique identifier of the trace to which this span belongs. If the request the Monitor sent includes a W3C traceparent header, the Monitor span reuses that trace ID, so it lines up with the trace in the target's own telemetry. Otherwise APIContext generates one.
spanIdStringA unique identifier representing the span. The Monitor span reuses the span ID from the traceparent header when there is one.
parentSpanIdStringOptional. A unique identifier representing the parent span of the current span. Timing spans set it to the Monitor span. The Monitor span does not set it.
startTimeUnixNano, endTimeUnixNanoStringThe start and end of the span, in nanoseconds since the Unix epoch. For the Monitor span these are the start and end of the result.

Monitor span attributes​

Every attribute below is set on the Monitor span, and the six timing spans carry the same attributes. The names are exactly as the exporter sends them. Earlier versions of this page showed a custom. prefix on the apimetrics_ names. The exporter does not add one.

AttributeTypeExamplePresentDescription
http.routeStringhttps://api.example.com/v1/statusAlwaysThe Monitor URL from the configuration
http.request.methodStringGETAlwaysThe HTTP method
url.fullStringhttps://api.example.com/v1/statusAlwaysThe full URL called by the platform
http.response.status_codeInteger200AlwaysThe response HTTP code
apimetrics_org_idStringEXAMPLE_ORG_IDAlwaysThe ID of the Organization that owns the Project
apimetrics_project_idStringEXAMPLE_PROJECT_IDAlwaysThe ID of the Project that owns the Monitor
apimetrics_project_nameStringExample ProjectAlwaysThe name of the Project
apimetrics_call_idStringEXAMPLE_MONITOR_IDAlwaysThe ID of the Monitor
apimetrics_call_nameStringExample API statusAlwaysThe name of the Monitor
apimetrics_result_idStringEXAMPLE_RESULT_IDAlwaysThe ID of this Result
apimetrics_agent_idStringapimetrics_azurenorwayeastWhen the node is foundThe ID of the node (test location) that made the call
apimetrics_cloudStringAzureWhen the node has a valueThe cloud from which the call was made
client.addressString203.0.113.10When the node has a valueThe source IP from which the call was made
apimetrics_cityStringOsloWhen the node has a valueThe city from which the call was made
apimetrics_regionStringOsloWhen the node has a valueThe region from which the call was made
apimetrics_countryStringNorwayWhen the node has a valueThe country from which the call was made
apimetrics_continentStringEuropeWhen the node has a valueThe continent from which the call was made
apimetrics_latitudeDouble59.9139When the node has a valueThe latitude from which the call was made
apimetrics_longitudeDouble10.7522When the node has a valueThe longitude from which the call was made
tls.protocol.nameStringTLSHTTPS, when TLS details are availableThe name of the TLS protocol through which the call was made
tls.protocol.versionString1.3HTTPS, when TLS details are availableThe version of the TLS protocol through which the call was made
tls.cipherStringTLS_AES_128_GCM_SHA256HTTPS, when TLS details are availableThe cipher of the TLS protocol through which the call was made
tls.next_protocolStringh2HTTPS, when the server negotiated oneThe next protocol of the TLS protocol through which the call was made
tls.server.certificate_chainArray of stringsOne PEM certificate per entryHTTPS, when the full chain is availableThe chain of the TLS certificate of the endpoint called
tls.server.issuerStringCN=Example CA R1,O=Example CAHTTPS, when the certificate is availableThe issuer of the TLS certificate of the endpoint called
tls.server.subjectStringCN=api.example.comHTTPS, when the certificate is availableThe subject of the TLS certificate of the endpoint called
tls.server.not_beforeString2026-09-01T00:00:00+00:00HTTPS, when the certificate is availableThe first valid date of the TLS certificate of the endpoint called, in ISO 8601 format
tls.server.not_afterString2026-11-30T00:00:00+00:00HTTPS, when the certificate is availableThe last valid date of the TLS certificate of the endpoint called, in ISO 8601 format
tls.server.hash.md5String2F127B4B8170CFA17349669CC5A5D9B5HTTPS, when the certificate is availableThe MD5 hash of the TLS certificate of the endpoint called, in uppercase hexadecimal
tls.server.hash.sha1StringA5499D20CD1D03665FE38DFABAE0BEDBEB1F7025HTTPS, when the certificate is availableThe SHA1 hash of the TLS certificate of the endpoint called, in uppercase hexadecimal
tls.server.hash.sha256StringDE802211979E5AF048501B36DB6D8FDDF2F86E33CF671B770F67094C05A1F587HTTPS, when the certificate is availableThe SHA256 hash of the TLS certificate of the endpoint called, in uppercase hexadecimal
tls.client.issuerStringNot in the exampleOnly if the Monitor is configured to use mTLSThe client certificate issuer of the endpoint called
tls.client.subjectStringNot in the exampleOnly if the Monitor is configured to use mTLSThe client certificate subject of the endpoint called
tls.client.not_beforeStringNot in the exampleOnly if the Monitor is configured to use mTLSThe first valid date of the client certificate of the endpoint called, in ISO 8601 format
tls.client.not_afterStringNot in the exampleOnly if the Monitor is configured to use mTLSThe last valid date of the client certificate of the endpoint called, in ISO 8601 format

A result with no timing data is not exported.

Timing spans​

Each result is split up into the following spans for timing information. Each is a child of the Monitor span, so it has the same trace ID and sets parentSpanId to the Monitor span's spanId. Each span starts when the one before it ends, and the first starts when the result starts.

SpanDescription
dnsTime taken for DNS lookup
connectTime taken for network connection
tls_handshakeTime taken for network handshake
uploadTime taken to upload the request
processingTime taken for the server to process the request (time to first byte)
downloadTime taken for the download to complete (time to last byte)

For more information on the OpenTelemetry data model, see the OpenTelemetry specification.

Workflow spans​

For a Workflow, nothing is exported as each Monitor finishes. When the last Monitor in the Workflow finishes, the webhook exports one Workflow span and, for each API Monitor result in the Workflow, the Monitor span and timing spans described above. The Workflow span is a separate span in the same export. Monitor spans do not name it as their parent span.

The Workflow span is named for the Workflow, starts when the Workflow result starts, and ends when it ends. It has these attributes:

AttributeTypeDescription
apimetrics_org_idStringThe ID of the Organization that owns the Project
apimetrics_project_idStringThe ID of the Project that owns the Monitor
apimetrics_project_nameStringThe name of the Project
apimetrics_workflow_idStringThe ID of the Workflow
apimetrics_workflow_nameStringThe name of the Workflow
apimetrics_workflow_result_idStringThe ID of this Workflow result

Conformance Events​

The OpenTelemetry (Conformance Events) webhook sends each conformance check result as an OTLP log record over OTLP/HTTP, not as a span. It posts to the URL exactly as you enter it, with the HTTP headers you set. Which results are sent follows the webhook's Pass and Fail switches.

FieldValue
scope.nameconformance
severityTextWARN for a failed check, INFO for a passed check
severityNumber13 (WARN) for a failed check, 9 (INFO) for a passed check
body<category> conformance check <result>ed, for example data conformance check failed

Log record attributes​

The attributes are the fields of the conformance result. Like the apimetrics_ names above, they have no prefix. Every record has these attributes:

AttributeTypeDescription
project_idStringThe ID of the Project
timestampStringThe time of the result
categoryStringThe check category: data, objective, specification, schema, security, coverage, threshold, or network
resultStringpass or fail

The other attributes depend on the category. Attributes in the last column are present only on a failed check.

CategoryAttributes on every resultAdded on a failed check
datacheck_name, call_id, result_iderror, rule_id, and when set, parent_rule_id, rule_json_path, rule_value, rule_regex, rule_substring_of, rule_count, source_url, json_pointer, value
objectivecall_id, http_method, url, metric, comparator, value, period, measuredNone
specificationoas_idrule_id, severity, and when set, count, description
schemaoas_id, result_id, http_method, urlkeyword, schema_path, instance_paths (array of strings), variance, expected, message
securityFailed checks only: specification, result_id, http_method, url, check_category, check_id, descriptionNot applicable
coveragecheck_name, metric, coverage, goal, total_calls, missing_calls, total_endpoints, missing_endpoints (numbers)missing_call_ids (array of strings), and when set, description
thresholdcall_id, http_method, url, metric, delta, period, measuredNone
networkcheck_name, affected_endpoints (number)description, domain

Attributes are strings unless the table says otherwise.