dynatrace
Skill71 starsChanged 8 days agoApache-2.0View on GitHub
Deploy and configure Dynatrace — OneAgent Kubernetes Operator, code-level instrumentation, Log Monitoring, custom metrics, SLOs, Dashboards, anomaly detection, Davis AI, and live incident investigation using the Dynatrace MCP server. Covers Terraform-managed Dynatrace resources.
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 12 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Ask for: environment ID, Kubernetes distribution (EKS/AKS/GKE), monitoring mode (fullStack / cloudNativeFullStack)
- Very specific: line 19
Create Secret with apiToken and dataIngestToken (store in Kubernetes Secret or secrets manager — never plain values)
- Distinctive: line 32
Add custom spans or business transaction tracing to a service.
- Very specific: line 36
Ask for: language (Node.js / Python / Java), business operations to trace (payment, checkout, data pipeline)
- Distinctive: line 39
Verify in Distributed Traces UI: service appears in Service Map with custom spans
- Distinctive: line 48
Ask for: service entity ID (from Smartscape or Settings API), alerting thresholds (auto-detection or fixed), notification target
- Distinctive: line 61
Ask for: SLI expression (availability / latency / custom), target %, timeframe
- Very specific: line 63
Use built-in metrics for availability: builtin:service.errors.server.successCount / builtin:service.requestCount.server
- Distinctive: line 71
Create a Dynatrace dashboard.
- Distinctive: line 74
Ask for: service entity ID, key metrics to show (availability, latency, throughput, error rate)
- Very specific: line 76
Use built-in service metrics: builtin:service.requestCount.server, builtin:service.response.time, builtin:service.errors.server.rate
- Distinctive: line 91
Ask Claude to run these via the MCP server:
- Distinctive: line 94
Check recent Kubernetes events for the affected namespace
- Distinctive: line 104
Use DQL via the MCP to query Grail directly:
- Distinctive: line 136
Ask Davis Copilot to explain the problem in plain English
- Distinctive: line 137
Run a Davis Analyzer on the affected service for automated root cause analysis
- Distinctive: line 148
Create a Dynatrace Notebook capturing the timeline, DQL queries, and evidence
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Configure, troubleshoot, or investigate incidents in Dynatrace.
Mode: setup
Deploy the Dynatrace Operator and OneAgent on Kubernetes.
Steps:
- Ask for: environment ID, Kubernetes distribution (EKS/AKS/GKE), monitoring mode (fullStack / cloudNativeFullStack)
- Install Operator from a pinned release, never
releases/latest:kubectl apply -f .../dynatrace-operator/releases/download/v1.11.0/kubernetes.yaml - Create Secret with
apiTokenanddataIngestToken(store in Kubernetes Secret or secrets manager — never plain values) - Generate
DynaKubeCR withcloudNativeFullStackfor automatic injection — no pod restarts required - Enable
metadataEnrichment: truefor Kubernetes metadata on all telemetry - Verify injection:
kubectl describe pod <app-pod> | grep dynatrace
Required token scopes:
apiToken:ReadConfig WriteConfig DataExport LogExport ReadSyntheticData WriteAnomalyDetectiondataIngestToken:metrics.ingest logs.ingest
Reference: references/dynatrace.md → Deployment, Token Scopes
Mode: instrument
Add custom spans or business transaction tracing to a service.
Steps:
- OneAgent auto-instruments HTTP, database, cache, and messaging — code changes only needed for custom business spans
- Ask for: language (Node.js / Python / Java), business operations to trace (payment, checkout, data pipeline)
- Generate SDK code for custom spans using
@dynatrace/oneagent-sdk(Node.js),oneagent-sdk(Python), or OneAgent Java SDK - For cross-service propagation: forward and extract the
x-dynatraceheader between services - Verify in Distributed Traces UI: service appears in Service Map with custom spans
Reference: references/dynatrace.md → Code-Level Instrumentation
Mode: monitor
Configure anomaly detection and alerting for a service.
Steps:
- Ask for: service entity ID (from Smartscape or Settings API), alerting thresholds (auto-detection or fixed), notification target
- Generate Terraform
dynatrace_service_anomalies_v2resource for failure rate and response time - Generate Terraform
dynatrace_alertingprofile linking anomalies to the team - Davis AI will auto-detect baseline anomalies — custom thresholds override only when auto-detection is too noisy
- Wire alerting profile to notification integration (PagerDuty, Slack, Opsgenie)
Reference: references/dynatrace.md → Terraform Provider, Davis AI Problem Feeds
Mode: slo
Define a Dynatrace SLO.
Steps:
- Ask for: SLI expression (availability / latency / custom), target %, timeframe
- Generate Terraform
dynatrace_slo_v2resource - Use built-in metrics for availability:
builtin:service.errors.server.successCount/builtin:service.requestCount.server - Validate the metric expression returns data in the Metrics Explorer before applying
- Set both
target_successandtarget_warningthresholds
Reference: references/dynatrace.md → SLOs
Mode: dashboard
Create a Dynatrace dashboard.
Steps:
- Ask for: service entity ID, key metrics to show (availability, latency, throughput, error rate)
- Generate Terraform
dynatrace_json_dashboardresource pointing to a JSON dashboard file - Use built-in service metrics:
builtin:service.requestCount.server,builtin:service.response.time,builtin:service.errors.server.rate - Provide dashboard JSON with tiles for each metric using
DATA_EXPLORERtile type
Reference: references/dynatrace.md → Terraform Provider
Mode: investigate
Live incident investigation using the Dynatrace MCP server.
Requires the Dynatrace MCP server connected to Claude Code. See setup in references/dynatrace.md → MCP Server Setup.
Cost note: execute_dql queries scan Grail data and may incur costs based on your Dynatrace consumption model. Start with short timeframes (last 1h–24h). Set DT_GRAIL_QUERY_BUDGET_GB to cap session spend.
Phase 1 — Triage (what is Davis AI seeing?)
Ask Claude to run these via the MCP server:
- List all open Problems — Davis AI auto-detects anomalies and groups related symptoms
- Fetch full problem details including root cause entity, impact, and affected services
- Check recent Kubernetes events for the affected namespace
List all open Problems in Dynatrace right now.
Get full details for Problem <problem-id> including root cause and affected entities.
Show me Kubernetes events for namespace production in the last 30 minutes.Phase 2 — Signals (logs, traces, exceptions)
Use DQL via the MCP to query Grail directly:
- Fetch error logs for the affected service in the incident window
- List recent exceptions with stack traces
- Find distributed traces with errors to identify the failing call
Show me error logs for the orders-service in the last hour.
List the top exceptions for orders-service with stack traces.
Find distributed traces with errors for orders-service — show the slowest and most frequent.Example DQL the MCP can generate and execute:
fetch logs
| filter service.name == "orders-service" and loglevel == "ERROR"
| sort timestamp desc
| limit 50
| fields timestamp, content, trace_id, span_idfetch spans
| filter service.name == "orders-service" and status == "ERROR"
| sort timestamp desc
| limit 20
| fields timestamp, span_name, error.message, trace_id, durationPhase 3 — Root cause with Davis AI
Let Davis AI perform automated analysis:
- Ask Davis Copilot to explain the problem in plain English
- Run a Davis Analyzer on the affected service for automated root cause analysis
- Find the entity (service, host, process group) at the root of the problem
Chat with Davis Copilot: "Why is orders-service having elevated error rates since 14:00 UTC?"
List available Davis analyzers for root cause analysis.
Find the entity named "orders-service" and show its current health.Phase 4 — Resolution and follow-up
- Create a Dynatrace Notebook capturing the timeline, DQL queries, and evidence
- Send a Slack message or email via the MCP notification tools
- Close the Problem with a resolution note once fix is validated
Create a Dynatrace notebook summarising the orders-service incident with the DQL queries we ran.
Send a Slack message to #incidents: "orders-service error rate normalising, fix deployed at <time>."
Close Problem <problem-id> with message "Root cause: bad deploy at 14:05 UTC, rolled back at 14:22 UTC."Reference: references/dynatrace.md → MCP Server Setup, Incident Investigation Workflow
Mode: debug
Diagnose Dynatrace data gaps or injection failures without the MCP server.
Classify the failure:
- Injection — OneAgent not injecting into pods
- Traces — service not in Service Map or distributed traces broken
- Metrics — custom metrics not appearing
- SLO — SLO shows 0% or "No data"
- Davis AI — Problems not being created for known issues
Evidence to collect:
# Operator and DynaKube status
kubectl -n dynatrace get dynakube
kubectl -n dynatrace get pods
# Check injection on app pod
kubectl describe pod <app-pod> | grep -i dynatrace
# Verify MINT ingestion (custom metrics)
curl "https://{env}.live.dynatrace.com/api/v2/metrics/query?metricSelector=<your.metric>" \
-H "Authorization: Api-Token ${DT_API_TOKEN}"
# List open Davis AI problems
curl "https://{env}.live.dynatrace.com/api/v2/problems?problemSelector=status(OPEN)" \
-H "Authorization: Api-Token ${DT_API_TOKEN}"Provide: symptom → root cause hypothesis → evidence command → fix → validation step
In this repository59 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/keda.mdcCursor rule
- .cursor/rules/kubernetes.mdcCursor rule
- .cursor/rules/platform-skills.mdcCursor rule
- .cursor/rules/terraform.mdcCursor rule
- code-reviewSkill
- platform-skillsSkill
- ai-governanceSkill
- awesome-docsSkill
- aws-profileSkill
- awsSkill
- azureSkill
- backup-drSkill
- chaosSkill
- checkovSkill
- cluster-upgradeSkill
- commitSkill
- complianceSkill
- composite-actionsSkill
- datadogSkill
- debugSkill
- documentSkill
- doraSkill
- finopsSkill
- fluxcdSkill
- gateway-apiSkill
- github-actionsSkill
- gitopsSkill
- helmchartSkill
- karpenterSkill
- kedaSkill
- kingfisherSkill
- kubernetesSkill
- kubescape-operatorSkill
- kubescapeSkill
- kyvernoSkill
- linkerdSkill
- linuxSkill
- mcpSkill
- observabilitySkill
- opaSkill
- openshiftSkill
- platform-skillsSkill
- preflightSkill
- productSkill
- progressive-deliverySkill
- pr-reviewSkill
- renovateSkill
- runtime-securitySkill
- secretsSkill
- self-improveSkill
- setup-agentsSkill
- supply-chainSkill
- terraformSkill
- token-optimizerSkill
- triageSkill
- trivySkill
- zizmorSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

