Monaco for Dynatrace Workflows: How are teams handling maintainability and code reviews?

Hi everyone,

We’re currently evaluating Dynatrace Monaco as our Configuration-as-Code solution for managing automation workflows, and overall it looks promising. Monaco is frequently recommended by the Dynatrace team and community for managing workflows as code at scale.

However, we’ve run into a concern that may become a maintainability challenge as workflow adoption grows.

The challenge

Many of our workflows contain:

  • Multiple tasks
  • JavaScript actions
  • Conditional routing
  • Error handling
  • External integrations

When exported and managed through Monaco, the workflow appears as a large serialized object, with JavaScript embedded within the workflow definition.

This raises a few concerns:

  • Difficult code reviews in Git
  • Large diffs for relatively small changes
  • Merge conflicts when multiple developers modify the same workflow
  • Reduced readability compared to maintaining code in separate source files
  • Challenges applying standard development practices such as linting and unit testing of workflow logic

Questions for the community

For teams actively managing Dynatrace workflows as code:

  1. Are you maintaining workflow definitions directly in Monaco-exported YAML/JSON?
  2. How do you review workflow changes in pull requests?
  3. Do you keep JavaScript task code in separate source files and generate the Monaco artifacts during CI/CD?
  4. Have you adopted an “Infrastructure as Code” pattern where Monaco artifacts are generated rather than manually edited?
  5. At what scale (number of workflows/developers) did workflow maintainability become a concern?

Looking for real-world experiences

I’m particularly interested in hearing from teams that manage:

  • Dozens of workflows
  • Multiple contributors
  • Complex workflow logic
  • Git-based deployment pipelines

Has the workflow export format been a significant challenge, or is it generally manageable in practice?

Any examples, lessons learned, or recommended repository structures would be greatly appreciated.

Thanks!

Hi,
Not easy but best option is be deployed in a lower environment and attached evidences is working as expected in the pull request.
Best regards

I’ve used Monaco to manage workflows across multiple Dynatrace tenants, and overall, my experience has been positive.

I agree that maintaining workflows through Monaco and Git adds some overhead, especially regarding readability and reviewing changes.

What worked well for us was developing and thoroughly testing workflows in a non-production environment, then committing the validated configuration to Git and promoting it across environments using Monaco.

Monaco’s templating capability was particularly useful in our case, where we needed multiple instances of the same workflow to distribute the workload.

One challenge is that manually modifying and re-exporting workflows can introduce additional changes that need cleanup, especially when using templates and references.

Despite the overhead, I find Monaco valuable for keeping Git as the source of truth and ensuring consistency across environments, particularly in production.

Kind Regards,

Kumaravel

Hi,

we are using dtctl for workflow export and deployments. I have a few posts here which may give you some idea. Unfortunately we have teams deploying manually as well via the GUI. That’s why we run a daily scheduled job to export all workflows using dtctl and commit them to Git, which allows us to track what has changed. Also agree that escaping JavaScript with slashes makes the YAML very hard to read.

I am also starting to think that Terraform is the better IaC approach. You have state management (which dtctl does not have) and also JavaScript can remain separate and be referenced using something like this:

task {
name = “prepare_payload”
description = “Run custom JavaScript code.”
action = “dynatrace.automations:run-javascript”
active = true
input = jsonencode({
script = file(“${path.module}/scripts/prepare_payload.js”)
})

That way it is self contained and no need to escape it with slashes and can be readable in Git.

Thanks eveyone for sharing your thoughts and apologize for late reply. Initially we thought Terraform as alternative but we felt for Dynatrace its complex to implement and felt not worth,