You can configure your Node.js Agent and AppDynamics Controller to view the application logs on Controller and on Cisco Cloud Observability. 

This document contains references to third-party documentation. Cisco AppDynamics does not own any rights and assumes no responsibility for the accuracy or completeness of such third-party documentation.

Supported Logging Framework

You can view the log records if the application uses the winston>=3.11 framework.

Enable Log Record

  1. Enable OpenTelemetry logging in AppDynamics profile by using the appdynamics.profile require statement. For more information, see Add the Require Statement.

          openTelemetryLogger: {
            enabled: true,
            collector: {
              url: <collector url, defaults to http://localhost:4318/v1/logs>
            },
          },
    CODE
  2. Enable the log record push feature from the AppDynamics SaaS Controller by using following node property: 
    • name: opentelemetry-logs-push-enabled
    • valueType: Boolean
    • Value: true
      For information about node properties, see App Agent Node Properties.
  3. (Optional) To enable log level control (to display the log record for the specific level and higher), use the following node property from AppDynamics SaaS Controller: 
    • name: opentelemetry-allowed-log-level
    • valueType: Integer
    • Value: See Severity Number.

Attributes of Log Records

The following lists the attributes along with the structure of the log record:

  • SeverityText
  • Body : <log message>
  • Attributes:
    • logger.name
    • severity
    • appd.bt.id

    • appd.bt.name
    • appd.request.guid
  • Trace ID (if available)
  • Span ID (if available)
  • Resource Attributes:
    • service.name
    • service.namespace
    • service.instance.id
    • telemetry.sdk.name
    • telemetry.sdk.janguage
    • telemetry.sdk.version
    • container.id

Next Step

Troubleshoot with Application Logs