• /
  • Log in
  • Free account

NerdGraph tutorial: APM agent configuration examples

This doc is a place for examples of configuring APM agents using our NerdGraph API.

Configure server-side configuration

Note that for APM agents to use configuration values changed via NerdGraph, server side configuration must be enabled.

For requirements, see server-side config requirements.

Here's an example query returning the status of the server side configuration setting for a given entity.

query ExampleReadQuery {
actor {
entity(guid:"ZjY1ODgxfEFQTXxBUFBYSUNBVElPTnz0ODEwMTY3NzZ") {
...on ApmApplicationEntity {
apmSettings {
apmConfig {
useServerSideConfig
}
}
}
}
}
}

Here's an example of disabling server-side configuration. Note that settings uses an array, which may be helpful if you want to update multiple entities.

mutation ExampleUpdateQuery(guid: "ZjY1ODgxfEFQTXxBUFBYSUNBVElPTnz0ODEwMTY3NzZ", settings: { apmConfig: { useServerSideConfig: false }} )
{
apmSettings {
apmConfig {
useServerSideConfig
}
}
errors {
description
}
}
}

For how to find an entity's GUID, see Find entity data.

Retrieve settings

Here's an example of returning an entity's transaction tracer settings:

query ExampleReadQuery {
actor {
entity(guid:"ZjY1ODgxfEFQTXxBUFBYSUNBVElPTnz0ODEwMTY3NzZ") {
... on ApmApplicationEntity {
guid
name
apmSettings {
transactionTracer {
enabled
explainEnabled
explainThresholdType
explainThresholdValue
}
}
}
}
}
}
Create issueEdit page
Copyright © 2022 New Relic Inc.