Dt App Notebooks

作者 Dynatrace9529e72715d9Apache-2.0161 个星标收录于 2026年10月8日更新于 2026年10月8日仓库7天前更新

Work with Dynatrace notebooks - create, modify, query, and analyze notebook JSON including sections, DQL queries, and visualizations.

AI 生成的概览

创建、修改、查询和分析包含分区、DQL 查询与可视化的 Dynatrace 笔记本 JSON 文档。

功能
该技能指导智能体处理 Dynatrace 笔记本,这类笔记本是存放在文档存储中的 JSON 文档,由有序的 markdown 与 DQL 分区组成。它说明了笔记本 JSON 结构、分区类型、可视化类型及其所需字段类型,以及使用 dtctl 命令的创建与更新流程。其产出是经校验并通过 dtctl apply 部署的笔记本 JSON 文件。
适用场景
适用于创建、修改、查询或分析 Dynatrace 笔记本的场景。适合需要编写或检查笔记本分区、DQL 查询或可视化设置的任务。不适用于笔记本之外的通用 Dynatrace 管理工作。
运行要求
需要 dtctl 命令行工具,并能访问 Dynatrace 环境及其文档存储,同时需要随附的参考文件和示例 JSON 资源。该技能不包含脚本,仅为说明与参考资料。

Dynatrace Notebook Skill

Overview

Dynatrace notebooks are JSON documents stored in the Document Store containing an ordered array of sections — markdown blocks for narrative and dql blocks for DQL queries with visualizations. Sections render top-to-bottom in array order.

When to use: Creating, modifying, querying, or analyzing notebooks.

Notebook JSON Structure

json
{  "name": "My Notebook",  "type": "notebook",  "content": {    "version": "7",    "defaultTimeframe": { "from": "now()-2h", "to": "now()" },    "sections": [      { "id": "1", "type": "markdown", "markdown": "# Title" },      {        "id": "2", "type": "dql", "title": "Query Section", "showInput": true,        "state": {          "input": { "value": "fetch logs | summarize count()" },          "visualization": "table",          "visualizationSettings": { "autoSelectVisualization": true, "chartSettings": {} },          "querySettings": {            "maxResultRecords": 1000, "defaultScanLimitGbytes": 500,            "maxResultMegaBytes": 1, "defaultSamplingRatio": 10, "enableSampling": false          }        }      }    ]  }}
  • Sections render in array order.
  • Section types: markdown, dql. (function exists but is rare.)
  • Use string-int IDs ("1", "2", …); UUIDs are also accepted.
  • content.defaultTimeframe sets the default timeframe; each section can override via section.state.input.timeframe. Hardcoded time filters in DQL are allowed.

Optional content properties: defaultSegments.

Reading & Analyzing

Fetch full content with dtctl get notebook <id> -o json (describe returns metadata only), then inspect the JSON to discover its available properties. Carefully read references/analyzing.md [blocked] before analyzing.

Create/Update Workflow (Mandatory Order)

Carefully follow the workflow described in references/create-update.md [blocked].

Key rules:

  • Load domain skills BEFORE generating queries — do not invent DQL.
  • Validate ALL section queries before adding to the notebook.
  • Set name before deploying.
  • Prefer autoSelectVisualization: true in visualizationSettings unless the user requested a specific visualization type — when false, state.visualization must be set explicitly.
  • Updating — ALWAYS read the current state first: dtctl get notebook <id> -o json, save it as notebook.json, modify that file, then deploy it. Never reconstruct JSON from scratch or inject an id manually — both silently overwrite UI edits the user made since last deployment.
  • Deploy with dtctl apply — validation runs automatically. If it fails, fix all reported errors before re-applying.

Visualization Types

Notebooks support a subset of Dynatrace visualizations:

  • Time-series (require timeseries/makeTimeseries): lineChart, areaChart, barChart, bandChart
  • Categorical (summarize ... by:{field}): categoricalBarChart, pieChart, donutChart
  • Single value / gauge / meter: singleValue, meterBar, gauge
  • Tabular (any data shape): table, raw, recordView
  • Distribution/status: histogram, honeycomb
  • Geographic maps: choropleth, dotMap, connectionMap, bubbleMap
  • Matrix/correlation: heatmap, scatterplot

Required field types per visualization: references/sections.md [blocked].

References

FileWhen to Load
create-update.md [blocked]Creating/updating notebooks
sections.md [blocked]Section types, visualization field requirements, settings
analyzing.md [blocked]Reading notebooks, extracting queries, purpose identification

来源与署名

来源:Dynatrace/dynatrace-for-ai位于skills/dt-app-notebooks提交9529e72

许可证: Apache-2.0

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架