HomeDocumentationAPI Reference
Getting StartedAPI ReferenceBug ReportingCrash ReportingAPMHelp Center

Add/Edit Attribute

You can add/edit a custom attribute using the following APIs, passing a string key and a string value.

// Add custom attributes to an existing trace
trace?.setAttributeWithKey("key", value: "value")
// Add custom attributes to an existing trace
[trace setAttributeWithKey:@"key" value:@"value"];
// Add custom attributes to an existing trace
trace.setAttribute("key", "value");
// Add custom attributes to an existing trace
trace?.setAttribute("key", "value")
// Add custom attributes to an existing trace
trace.setAttribute('key', 'value')
// Add custom attributes to an existing trace
trace.setAttribute('key', 'value')