Dynatrace Observability with dtctl
What this skill does
Use this skill to investigate Dynatrace telemetry and security findings with reproducible DQL and dtctl workflows. It is a standalone package: copy the whole folder when deploying it to another project.
The skill favours progressive disclosure: start here, then load only the reference, example, template, or DQL resource needed for the task.
When to use it
Use this skill for:
- production incident response and root cause analysis;
- deployment impact and release health validation;
- production error triage across Davis problems/events, spans, logs, traces, metrics, and user events;
- performance regression checks against baseline behaviour;
- vulnerability and compliance finding review;
- DQL query writing, validation, and troubleshooting;
- Dynatrace terminal workflows with
dtctl;
- evidence hand-off into Dynatrace Workflows, dashboards, notebooks, or API automation.
When not to use it
Do not use this skill for:
- generic DevOps advice with no Dynatrace evidence source;
- product marketing, licensing, or procurement questions;
- architecture-only discussions with no operational validation;
- non-Dynatrace observability platforms.
Operating rules
- Evidence first: state what was queried and what the result supports.
- Always set a bounded timeframe before querying high-volume data.
- Optimise DQL in this order: narrow timeframe, filter early, select fields early, transform/parse, aggregate, then sort/limit.
- For service failures, expand
span.events and inspect exception records before concluding.
- For Davis analysis, prefer
dt.davis.problems and dt.davis.events examples over guessed problem fields.
- For security and compliance posture, use latest-scan or deduplicated current-state patterns, not broad historical counts.
- For Runtime Vulnerability Analytics, state monitoring-mode and deep-monitoring limitations when evidence is incomplete.
- Use
entityName(dt.entity.service) for readable service names while filtering by stable entity identifiers where possible.
- Check
dtctl context, safety level, and required scopes before running mutating operations.
- If access fails, diagnose context, command capability, token scopes, and safety level before changing the query or conclusion.
- If service, entity, environment, timeframe, or deployment markers are ambiguous, discover candidates or narrow scope before querying high-volume telemetry.
- If correlations are incomplete or contradictory, state evidence gaps and confidence instead of claiming confirmed root cause.
- Prefer
--plain, --output json, or --output yaml for automation; do not parse formatted tables.
- Do not include secrets, platform tokens, tenant-specific URLs, or private trace/log payloads in reports.
Reference routing
Load the smallest matching file first:
| Task |
Load |
Set up or validate dtctl, contexts, safety levels, scopes, command discovery |
references/dtctl-setup-and-safety.md |
| Resolve missing access, scope errors, ambiguous telemetry, or inconclusive correlations |
references/fallback-guidance.md |
| Write, fix, validate, or optimise DQL |
references/dql-query-patterns.md |
| Investigate an incident, outage, active Davis problem, or unknown failure |
references/incident-response.md |
| Validate a deployment, release gate, or rollback decision |
references/deployment-release-validation.md |
| Analyse latency, throughput, saturation, or regression against baseline |
references/performance-regression.md |
| Triage vulnerabilities, compliance findings, or security events |
references/security-compliance-triage.md |
| Produce a structured incident, deployment, or security report |
references/output-contracts.md |
Bundled resources
- Reusable DQL templates live in resources/dql/.
- Report templates live in resources/templates/.
- Worked examples live in examples/.
- A portable context check helper lives at scripts/validate-dtctl-context.sh.
Validated source areas
This package is aligned to the public Dynatrace documentation areas below. Treat external docs as verification sources, not runtime dependencies.
- Dynatrace Query Language guide, reference, commands, and best practices.
- Logs on Grail examples and DQL timeseries examples.
- Dynatrace Intelligence DQL examples for Davis problems and events.
- Application Security and Runtime Vulnerability Analytics guidance.
- Dynatrace Workflows overview and Dynatrace API reference.
Default workflow
- Identify the user's intent and select the reference file from the routing table.
- Establish context: environment, timeframe, service/entity, deployment time, or finding type.
- Validate access and command capability if
dtctl is needed.
- If access, scope, entity, timeframe, or correlation evidence is incomplete, use references/fallback-guidance.md.
- Build or adapt DQL from the relevant reference and
resources/dql/ template.
- Run the smallest safe query first, usually with
| limit 1 or a narrow timeframe.
- Correlate at least two relevant sources before stating root cause.
- Produce an evidence-based report using the relevant template.
Minimal setup
Before deep analysis, establish command and access context.
# Install dtctl (macOS/Linux)
brew install dynatrace-oss/tap/dtctl
# Authenticate (OAuth recommended)
dtctl auth login --context my-env --environment "https://<env>.apps.dynatrace.com"
# Verify config, context, token, connectivity, auth
dtctl doctor
For token-based contexts (for CI/CD or headless runs):
dtctl config set-context my-env \
--environment "https://<env>.apps.dynatrace.com" \
--token-ref my-token \
--safety-level readwrite-mine
dtctl config set-credentials my-token --token "$DT_API_TOKEN"
1---2name: dynatrace-observability3description: Use when investigating Dynatrace incidents, validating releases, writing DQL, triaging security findings, or operating Dynatrace with dtctl.4---56# Dynatrace Observability with dtctl78## What this skill does910Use this skill to investigate Dynatrace telemetry and security findings with reproducible DQL and `dtctl` workflows. It is a standalone package: copy the whole folder when deploying it to another project.1112The skill favours progressive disclosure: start here, then load only the reference, example, template, or DQL resource needed for the task.1314## When to use it1516Use this skill for:1718- production incident response and root cause analysis;19- deployment impact and release health validation;20- production error triage across Davis problems/events, spans, logs, traces, metrics, and user events;21- performance regression checks against baseline behaviour;22- vulnerability and compliance finding review;23- DQL query writing, validation, and troubleshooting;24- Dynatrace terminal workflows with `dtctl`;25- evidence hand-off into Dynatrace Workflows, dashboards, notebooks, or API automation.2627## When not to use it2829Do not use this skill for:3031- generic DevOps advice with no Dynatrace evidence source;32- product marketing, licensing, or procurement questions;33- architecture-only discussions with no operational validation;34- non-Dynatrace observability platforms.3536## Operating rules3738- Evidence first: state what was queried and what the result supports.39- Always set a bounded timeframe before querying high-volume data.40- Optimise DQL in this order: narrow timeframe, filter early, select fields early, transform/parse, aggregate, then sort/limit.41- For service failures, expand `span.events` and inspect exception records before concluding.42- For Davis analysis, prefer `dt.davis.problems` and `dt.davis.events` examples over guessed problem fields.43- For security and compliance posture, use latest-scan or deduplicated current-state patterns, not broad historical counts.44- For Runtime Vulnerability Analytics, state monitoring-mode and deep-monitoring limitations when evidence is incomplete.45- Use `entityName(dt.entity.service)` for readable service names while filtering by stable entity identifiers where possible.46- Check `dtctl` context, safety level, and required scopes before running mutating operations.47- If access fails, diagnose context, command capability, token scopes, and safety level before changing the query or conclusion.48- If service, entity, environment, timeframe, or deployment markers are ambiguous, discover candidates or narrow scope before querying high-volume telemetry.49- If correlations are incomplete or contradictory, state evidence gaps and confidence instead of claiming confirmed root cause.50- Prefer `--plain`, `--output json`, or `--output yaml` for automation; do not parse formatted tables.51- Do not include secrets, platform tokens, tenant-specific URLs, or private trace/log payloads in reports.5253## Reference routing5455Load the smallest matching file first:5657| Task | Load |58| --- | --- |59| Set up or validate `dtctl`, contexts, safety levels, scopes, command discovery | [references/dtctl-setup-and-safety.md](references/dtctl-setup-and-safety.md) |60| Resolve missing access, scope errors, ambiguous telemetry, or inconclusive correlations | [references/fallback-guidance.md](references/fallback-guidance.md) |61| Write, fix, validate, or optimise DQL | [references/dql-query-patterns.md](references/dql-query-patterns.md) |62| Investigate an incident, outage, active Davis problem, or unknown failure | [references/incident-response.md](references/incident-response.md) |63| Validate a deployment, release gate, or rollback decision | [references/deployment-release-validation.md](references/deployment-release-validation.md) |64| Analyse latency, throughput, saturation, or regression against baseline | [references/performance-regression.md](references/performance-regression.md) |65| Triage vulnerabilities, compliance findings, or security events | [references/security-compliance-triage.md](references/security-compliance-triage.md) |66| Produce a structured incident, deployment, or security report | [references/output-contracts.md](references/output-contracts.md) |6768## Bundled resources6970- Reusable DQL templates live in [resources/dql/](resources/dql/).71- Report templates live in [resources/templates/](resources/templates/).72- Worked examples live in [examples/](examples/).73- A portable context check helper lives at [scripts/validate-dtctl-context.sh](scripts/validate-dtctl-context.sh).7475## Validated source areas7677This package is aligned to the public Dynatrace documentation areas below. Treat external docs as verification sources, not runtime dependencies.7879- Dynatrace Query Language guide, reference, commands, and best practices.80- Logs on Grail examples and DQL timeseries examples.81- Dynatrace Intelligence DQL examples for Davis problems and events.82- Application Security and Runtime Vulnerability Analytics guidance.83- Dynatrace Workflows overview and Dynatrace API reference.8485## Default workflow86871. Identify the user's intent and select the reference file from the routing table.882. Establish context: environment, timeframe, service/entity, deployment time, or finding type.893. Validate access and command capability if `dtctl` is needed.904. If access, scope, entity, timeframe, or correlation evidence is incomplete, use [references/fallback-guidance.md](references/fallback-guidance.md).915. Build or adapt DQL from the relevant reference and `resources/dql/` template.926. Run the smallest safe query first, usually with `| limit 1` or a narrow timeframe.937. Correlate at least two relevant sources before stating root cause.948. Produce an evidence-based report using the relevant template.9596## Minimal setup9798Before deep analysis, establish command and access context.99100```bash101# Install dtctl (macOS/Linux)102brew install dynatrace-oss/tap/dtctl103104# Authenticate (OAuth recommended)105dtctl auth login --context my-env --environment "https://<env>.apps.dynatrace.com"106107# Verify config, context, token, connectivity, auth108dtctl doctor109```110111For token-based contexts (for CI/CD or headless runs):112113```bash114dtctl config set-context my-env \115 --environment "https://<env>.apps.dynatrace.com" \116 --token-ref my-token \117 --safety-level readwrite-mine118119dtctl config set-credentials my-token --token "$DT_API_TOKEN"120```