Skip to main content
Version: 24.05

Performance Monitoring - Network Trace

Enterprise

This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.

Endpoint​

/o/apm/network

Overview​

Returns the aggregated and over-time data of one network trace (the requests the SDK made to one URL).

Authentication​

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions​

  • Requires Read permission for the Performance Monitoring feature (performance_monitoring) in the target app.

Request Parameters​

ParameterTypeRequiredDescription
api_keyStringYes (or auth_token)API key authentication
auth_tokenStringYes (or api_key)Auth token authentication
app_idStringYesID of the app the trace belongs to.
idStringYesTrace ID, as returned in the id field of the traces listed by the Performance Monitoring read endpoints.
periodStringNoPeriod of the data, for example 30days or a date range. Defaults to 30days.
bucketStringNoSet to hourly to get the over-time data per hour instead of per day.

Examples​

Example: Read a network trace​

curl "https://your-server.com/o/apm/network?api_key=YOUR_API_KEY&app_id=YOUR_APP_ID&id=TRACE_ID&period=30days"

Response​

Success Response​

{
"aggregate": {
"example.com/demo/": {
"name": "example.com/demo/",
"id": "51dc02d105e5aaa1d576cbd9f2225726:0650152841ea0d08dd73b937a3987328c4f3a1675b2ba71137208da4fcacee51",
"data": {
"response_code": 100
}
}
},
"overTime": {
"example.com/demo/": {
"name": "example.com/demo/",
"id": "51dc02d105e5aaa1d576cbd9f2225726:0650152841ea0d08dd73b937a3987328c4f3a1675b2ba71137208da4fcacee51",
"data": {
"response_code": {
"2022.4.7": 100
}
}
}
},
"metrices": {
"response_code": true,
"response_payload_size": true,
"response_time": true
},
"trace": "example.com/demo/"
}

Response Fields​

FieldTypeDescription
traceStringName of the trace.
aggregateObjectAggregated data of the trace for the whole period, keyed by trace name.
overTimeObjectData of the trace over time, keyed by trace name, then by metric and date.
metricesObjectMetrics reported for the trace.

Error Responses​

  • HTTP 400 - Missing or invalid trace ID:
{
"result": "Device trace id not provided"
}

Behavior​

  • Decodes id to the trace name and reads the stored data of that network trace for the period.
  • When the trace has no data in the period, aggregate and overTime contain empty objects.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.apmTrace data and propertiesReads aggregated trace data and trace properties.