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 從公開儲存庫中收錄這些內容。

檢舉或申請下架