# dynatrace-oss/dtwiz architecture

> Architecture diagram of the GitHub repository dynatrace-oss/dtwiz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dynatrace-oss/dtwiz
- Repository: https://github.com/dynatrace-oss/dtwiz

## Overview

dtwiz is a Dynatrace ingestion CLI: it inspects a host or project, recommends an ingestion approach, deploys or configures that approach, and can watch for arriving telemetry. The README documents distinct installation paths for host agents, OpenTelemetry, Kubernetes, Docker, and cloud integrations; the graph preserves these major branches. Source excerpts are partial, so links between unsampled implementation details are omitted where their callers are not established.

Main entry points: [`pkg/installer/installer.go`](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/installer.go) (Install dispatcher), [`cmd/root.go`](https://github.com/dynatrace-oss/dtwiz/blob/main/cmd/root.go) (Command entry), [`cmd/setup.go`](https://github.com/dynatrace-oss/dtwiz/blob/main/cmd/setup.go) (Guided setup), [`pkg/installer/otel/otel.go`](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/otel/otel.go) (OpenTelemetry setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["CLI workflow"]
  node_cli["Command entry<br/>[root.go]"]
  node_setup["Guided setup<br/>[setup.go]"]
end

subgraph group_discovery["Discovery and advice"]
  node_analysis["Environment analysis<br/>[analyzer.go]"]
  node_recommend["Ranked recommendations<br/>[recommender.go]"]
end

subgraph group_deployment["Ingestion deployment"]
  node_installer["Install dispatcher<br/>[installer.go]"]
  node_oneagent["OneAgent install<br/>[oneagent.go]"]
  node_otel["OpenTelemetry setup<br/>[otel.go]"]
  node_otelcollector["Collector deployment<br/>[collector.go]"]
  node_kubernetes["Kubernetes install<br/>[install.go]"]
  node_docker["Docker install<br/>[docker.go]"]
  node_aws["AWS integration<br/>[install.go]"]
  node_lambda["Lambda layer<br/>[aws_lambda.go]"]
  node_azure["Azure integration<br/>[install.go]"]
  node_gcp["GCP integration<br/>[install.go]"]
end

subgraph group_integration["Dynatrace integration"]
  node_extension["Extension and routes"]
  node_api["Dynatrace API client<br/>[client.go]"]
end

subgraph group_feedback["Ingest feedback"]
  node_watch["Ingest watcher<br/>[ingest_watch.go]"]
end

node_operator(("CLI operator"))
node_environment[("Dynatrace environment")]

node_operator -->|"runs commands"| node_cli
node_cli -->|"dispatches setup"| node_setup
node_setup -->|"analyzes system"| node_analysis
node_setup -->|"requests ranking"| node_recommend
node_setup -->|"starts installation"| node_installer
node_cli -->|"runs analyze"| node_analysis
node_cli -->|"runs recommend"| node_recommend
node_cli -->|"runs install"| node_installer
node_installer -->|"dispatches"| node_oneagent
node_installer -->|"dispatches"| node_otel
node_installer -->|"dispatches"| node_otelcollector
node_installer -->|"dispatches"| node_kubernetes
node_installer -->|"dispatches"| node_docker
node_installer -->|"dispatches"| node_aws
node_installer -->|"dispatches"| node_lambda
node_installer -->|"dispatches"| node_azure
node_installer -->|"dispatches"| node_gcp
node_otel -->|"configures routes"| node_extension
node_extension -->|"reads and writes settings"| node_environment
node_api -->|"sends API requests"| node_environment
node_watch -->|"queries telemetry"| node_environment
node_cli -->|"runs watch"| node_watch

click node_cli "https://github.com/dynatrace-oss/dtwiz/blob/main/cmd/root.go"
click node_setup "https://github.com/dynatrace-oss/dtwiz/blob/main/cmd/setup.go"
click node_analysis "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/analyzer/analyzer.go"
click node_recommend "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/recommender/recommender.go"
click node_installer "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/installer.go"
click node_oneagent "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/oneagent/oneagent.go"
click node_otel "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/otel/otel.go"
click node_otelcollector "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/otel/collector.go"
click node_kubernetes "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/kubernetes/install.go"
click node_docker "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/docker.go"
click node_aws "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/aws/install.go"
click node_lambda "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/aws_lambda.go"
click node_azure "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/azure/install.go"
click node_gcp "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/gcp/install.go"
click node_extension "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/extension_client.go"
click node_api "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/client/client.go"
click node_watch "https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/ingest_watch.go"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_setup toneBlue
class node_analysis,node_recommend,node_environment toneAmber
class node_installer,node_oneagent,node_otel,node_otelcollector,node_kubernetes,node_docker,node_aws,node_lambda,node_azure,node_gcp toneMint
class node_extension,node_api toneRose
class node_watch,node_operator toneIndigo
```

## Components

### CLI workflow

- [Command entry](https://github.com/dynatrace-oss/dtwiz/blob/main/cmd/root.go): `cmd/root.go`
- [Guided setup](https://github.com/dynatrace-oss/dtwiz/blob/main/cmd/setup.go): `cmd/setup.go`

### Discovery and advice

- [Environment analysis](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/analyzer/analyzer.go): `pkg/analyzer/analyzer.go`
- [Ranked recommendations](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/recommender/recommender.go): `pkg/recommender/recommender.go`

### Ingestion deployment

- [Install dispatcher](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/installer.go): `pkg/installer/installer.go`
- [OneAgent install](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/oneagent/oneagent.go): `pkg/installer/oneagent/oneagent.go`
- [OpenTelemetry setup](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/otel/otel.go): `pkg/installer/otel/otel.go`
- [Collector deployment](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/otel/collector.go): `pkg/installer/otel/collector.go`
- [Kubernetes install](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/kubernetes/install.go): `pkg/installer/kubernetes/install.go`
- [Docker install](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/docker.go): `pkg/installer/docker.go`
- [AWS integration](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/aws/install.go): `pkg/installer/aws/install.go`
- [Lambda layer](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/aws_lambda.go): `pkg/installer/aws_lambda.go`
- [Azure integration](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/azure/install.go): `pkg/installer/azure/install.go`
- [GCP integration](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/gcp/install.go): `pkg/installer/gcp/install.go`

### Dynatrace integration

- [Extension and routes](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/extension_client.go): `pkg/installer/extension_client.go`
- [Dynatrace API client](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/client/client.go): `pkg/client/client.go`

### Ingest feedback

- [Ingest watcher](https://github.com/dynatrace-oss/dtwiz/blob/main/pkg/installer/ingest_watch.go): `pkg/installer/ingest_watch.go`

### Other components

- **CLI operator**
- **Dynatrace environment**

## Connections

- CLI operator → Command entry: runs commands
- Command entry → Guided setup: dispatches setup
- Guided setup → Environment analysis: analyzes system
- Guided setup → Ranked recommendations: requests ranking
- Guided setup → Install dispatcher: starts installation
- Command entry → Environment analysis: runs analyze
- Command entry → Ranked recommendations: runs recommend
- Command entry → Install dispatcher: runs install
- Install dispatcher → OneAgent install: dispatches
- Install dispatcher → OpenTelemetry setup: dispatches
- Install dispatcher → Collector deployment: dispatches
- Install dispatcher → Kubernetes install: dispatches
- Install dispatcher → Docker install: dispatches
- Install dispatcher → AWS integration: dispatches
- Install dispatcher → Lambda layer: dispatches
- Install dispatcher → Azure integration: dispatches
- Install dispatcher → GCP integration: dispatches
- OpenTelemetry setup → Extension and routes: configures routes
- Extension and routes → Dynatrace environment: reads and writes settings
- Dynatrace API client → Dynatrace environment: sends API requests
- Ingest watcher → Dynatrace environment: queries telemetry
- Command entry → Ingest watcher: runs watch
