Skip to main content
Version: 25.03

Performance Monitoring - Edit

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​

/i/apm/edit

Overview​

Sets the issue threshold, in seconds, of a network or device trace.

Authentication​

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

Permissions​

Requires performance_monitoring Update permission.

Request Parameters​

ParameterTypeRequiredDescription
app_idStringYesApplication ID.
idStringYesTrace ID, as returned in the id field of traces by the Performance Monitoring read endpoints (for example /o/apm/network, /o/apm/device and /o/apm/issues).
typeStringYesTrace type: network or device.
thresholdNumberYesNew threshold in seconds. Must be a number greater than or equal to 0; use a whole number of seconds. Trace samples slower than the threshold are reported as issues. New traces start with a threshold of 2.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Examples​

Set a threshold for a network trace​

/i/apm/edit?
app_id=6991c75b024cb89cdc04efd2&
api_key=YOUR_API_KEY&
type=network&
id=TRACE_ID&
threshold=3

Response​

Success Response​

{
"result": "Issue updated"
}

Response Fields​

FieldTypeDescription
resultStringResult message.

Error Responses​

  • 400
{
"result": "Unacceptable trace type"
}
  • 400
{
"result": "APM id not provided"
}
  • 400
{
"result": "Threshold should be a number greater than equal to 0"
}

Behavior​

  • Updates the threshold stored for the trace identified by id and type.
  • Writes an apm_edited system log entry with the trace settings before the change and the update.
Implementation details

Database Collections

CollectionUsed forData touched by this endpoint
countly.apmTrace propertiesSets threshold on the trace property document <app_id>_<type>_<name>_props.