Install and configure the following agents to append the Splunk log data with the request GUID, business transaction ID, and node ID. The Splunk Universal Forwarder that ingests these logs is configured to further augment the log data with the Cisco AppDynamics application name and tier name. This combined data facilitates correlation between the Cisco AppDynamics APM entities and Splunk logs for those entities.

Make sure that you are using the 24.7.0 or later version of the following agents.

The agent configuration utilizes Mapped Diagnostic Context (MDC) to improve the application logging. MDC allows you to store contextual information in a logging message. The MDC is a key-value store propagated between logging events. You can use it to store information and then include that information in every log message included in a single request.

Supported Log Frameworks

AgentSupported Frameworks
Java Agent
  • Logback 1.x
  • Log4j2
  • Log4j
.Net Agent
  • NLog 4.1 or later
  • Log4net 2.0 or later
Node.js Agent
  • Winston 3.13.1

Enable Application Metadata Enrichment In Logs

By default, the log enrichment is disabled. An administrator can set the following system property to true to enable this feature.

System Property: appdynamics.enable.log.metadata.enrichment

Type: Boolean

Default: None

Required: No

Alternatively, you can set the enable-log-metadata-enrichment node property to true to enable this feature. See App Agent Node Properties.

This node property is applicable to Java, Node.js, and .Net agents. The node property takes preference over system property and the node property can be configured at application/node/tier level.

Enrich the Log Metadata for Agents

You can utilize appenders and targets in the application log configuration files to record the MDC keys. You must define these attributes in the application log files to append the log metadata.

The configuration differs based on whether you use structured or unstructured logs. Unstructured logs are large text files made of human-readable strings. Structured logs use objects instead of strings. These objects can include variables, data structures, methods, and functions. For instance, a log object might detail an application or platform. The structured logs are suitable for machine reading.