Telemetry Configuration Guide¶
telemetry is used to configure the associated views on the entity details page, such as logs, events, traces, and dashboards. Each configuration item represents a view card that can be displayed.
Basic Structure¶
telemetry:
- name: "Error Logs"
type: explorer
viewName: logs
query: "service='{{metadata.service}}'"
- name: "Metrics"
type: dashboard
timerange: "30m"
viewName: "Service Overview"
Notes:
- If
nameandviewNamerequire internationalization, they can be split intozh-CNanden-US. - If internationalization is not needed, a simple string can be used.
Field Descriptions¶
name¶
The name of the view displayed on the details page.
Example:
type¶
The type of associated view. Currently, two types are supported:
dashboard: Dashboardexplorer: Explorer
explorer Type Configuration¶
explorer is used to associate explorers for logs, events, traces, containers, Pods, etc.
viewName¶
The type of explorer. Currently supported:
logs: Log Explorerevent: Event Explorertrace: Trace Explorercontainer: Container Explorerpod: Pod Explorer
query¶
Filter conditions using DQL query syntax.
Supports referencing current entity attributes via variables:
For example:
More complex conditions can also be written:
explorer Examples¶
- name: "Error Logs"
type: explorer
viewName: logs
query: "service='{{metadata.service}}' AND df_status NOT IN ['ok','info']"
- name: "Traces"
type: explorer
viewName: trace
query: "service='{{metadata.service}}'"
- name: "Events"
type: explorer
viewName: event
query: "service='{{metadata.service}}'"
dashboard Type Configuration¶
dashboard is used to display dashboards on the details page.
timerange¶
The time range for the dashboard query, for example:
keys¶
Display the dashboard only when certain entity conditions are met.
For example:
This means the dashboard will only be displayed when the current entity's database_type is MySQL.
viewName¶
The name of the dashboard.
- Must match the name of a dashboard from the built-in views.
- The name must be consistent with the system's built-in dashboard; otherwise, it cannot be opened correctly.
dashboard Examples¶
- name: "Metrics"
type: dashboard
timerange: "30m"
viewName: "Service Overview"
- name: "Metrics"
type: dashboard
keys: { database_type: "MySQL" }
timerange: "1h"
viewName: "Infrastructure MySQL Monitoring View"
- name: "Metrics"
type: dashboard
keys: { database_type: "Oracle" }
timerange: "1h"
viewName: "Infrastructure Oracle Monitoring View"
Complete Example¶
telemetry:
- name: "Error Logs"
type: explorer
viewName: logs
query: "service='{{metadata.service}}' AND df_status NOT IN ['ok','info']"
- name: "Traces"
type: explorer
viewName: trace
query: "service='{{metadata.service}}'"
- name: "Events"
type: explorer
viewName: event
query: "service='{{metadata.service}}'"
- name: "Metrics"
type: dashboard
timerange: "30m"
viewName: "Service Overview"
- name: "Metrics"
type: dashboard
keys: { database_type: "MySQL" }
timerange: "1h"
viewName: "Infrastructure MySQL Monitoring View"
- name: "Metrics"
type: dashboard
keys: { database_type: "Oracle" }
timerange: "1h"
viewName: "Infrastructure Oracle Monitoring View"
Configuration Recommendations¶
- For internationalization, use
zh-CNanden-USfornameandviewName. - The
{{metadata.field}}referenced inexplorer.querymust be a real attribute that exists in the entity. dashboard.viewNamemust point to a system-built-in dashboard.keysis suitable for displaying different dashboards based on entity attribute values.- Multiple associated views can be configured for a single entity by appending them directly under
telemetry.