Logging reference for Dynatrace Configuration as Code via Monaco
All Dynatrace Configuration as Code via Monaco (Dynatrace Monaco CLI) commands accept the optional flag
-v for short).
This flag enables additional debug log output that can help you find the cause of an error.
Regardless of flags, the CLI always writes a verbose log file to a
.log/ folder created in the directory in which the command was executed.
By default, logs include timestamps in the timezone of the machine on which they were produced.
To write UTC timestamps instead, set the
MONACO_LOG_TIME=utc environment variable.
1MONACO_LOG_TIME=utc monaco deploy manifest.yaml
Support archive for troubleshooting
For enhanced troubleshooting, use the
--support-archive flag, which enables the CLI to generate a ZIP archive that contains detailed information about the CLI's operations during execution.
1monaco --support-archive <command>
The generated ZIP archive named
support-archive-<timestamp>.zip is stored in the CLI's current working directory and includes various information such as regular logs, HTTP request and response data:
<timestamp>.log—all logs produced by the Dynatrace Monaco CLI
<timestamp>-req.log—HTTP requests made to the Dynatrace API
<timestamp>-resp.log—HTTP responses received from the Dynatrace API
Sensitive security information such as the authorization header is excluded from the recorded HTTP request data in these files.
Known limitation: The content of multipart POST requests is not logged.
Structured JSON logging
Dynatrace Monaco CLI version 2.4.0+
To allow the processing of logs by other tools and automation, the CLI supports logging in structured JSON format instead of unstructured text.
To activate structured JSON logging, use the
MONACO_LOG_FORMAT=json environment variable.
1MONACO_LOG_FORMAT=json monaco deploy manifest.yaml
In structured JSON logging mode, the basic log data is extended with metadata fields that supply details about the configuration coordinate, environment, and possibly error that a log line relates to. For details on metadata fields, see the Metadata log fields section.
Basic log fields
These fields are always present.
|The log level - |
|The timestamp of the log line.|
|The log message.|
Metadata log fields
Metadata fields are included based on their availability and relevance to the log line; not all metadata fields are included in all log lines.
The coordinate of the configuration to which this log is related.
The type of the configuration to which this log is related.
This is logged in some cases in which no full
The target environment to which this log line is related.
This contains information about the environment's
Details about the underlying error. This is only included for warning and error log lines.
This contains information about the
Details differ based on the type of error.
For the content of errors, please refer to the code in GitHub.
Some log lines might contain further non-standard fields with specific information related to them. For example, some parsing errors include the full invalid API response content in an additional field.