You can use Davis CoPilot in Dashboards and Notebooks to explore your data through natural language. It allows you to translate your conversational prompts directly into DQL queries that reflect the context of your environment. You can choose to auto-execute generated queries or generate DQL only.
This page assumes that you have completed the setup described in Getting started with Davis CoPilot.
Go to Notebooks and open or create a notebook you can edit.
Open the Add menu and select Davis CoPilot. A new Davis CoPilot notebook section is created with an empty prompt box.
In the prompt box, type a prompt. Try average cpu usage percentage by host
or see the examples displayed in the web UI for inspiration.
optional If your prompt doesn't specify the timeframe, you can still specify it in your section header. The default is Last 2 hours.
Select Run. Davis CoPilot generates and runs the query for you.
optional If you want to see the generated query before running it, open the menu next to the Run button and select Generate DQL only.
Review the results.
optional Select the Options in the section header to change the visualization (refer to the visualization-specific documentation for more information).
To have Dynatrace automatically select a visualization for your query, turn on Auto select in the upper-right corner of your visualization settings pane.
Go to Dashboards and open or create a dashboard you can edit.
Open the Add menu and select Davis CoPilot.
optional At the top of the prompt definition panel, enter a tile title.
In the prompt box, type a prompt. Try average cpu usage percentage by host
or see the examples displayed in the web UI for inspiration.
optional If your prompt doesn't specify a timeframe, you can still specify it for the dashboard in your dashboard header (default is Last 2 hours) or the Custom timeframe settings (for a tile-specific timeframe).
Select Run. Davis CoPilot generates and runs the query for you.
Review the results.
optional Select the Visual tab to change the visualization (refer to the visualization-specific documentation for more information).
Even though Davis CoPilot is not charged for, all queries that are executed by Davis CoPilot are subject to licensing consumption according to your existing licensing agreement.
Environment-aware queries enrich Davis CoPilot with your environment data. This lets you generate more accurate queries that identify and reference relevant entities, events, spans, logs, and metrics from your environment. You can also run more complex data analyses by asking Davis CoPilot about the specifics of your data. To learn more about how to control and manage which data Davis CoPilot has access to and how to enable environment-aware queries, see Enable environment-aware queries.
Once enabled, Davis CoPilot periodically scans your Grail data to create its own semantic index. Certain data fragments are sent to Microsoft Azure OpenAI during the semantic indexing. Examples of such data fragments include metric keys, dimensions, and field names. When a user provides a prompt, Davis CoPilot first identifies the most relevant fragments from the data it has indexed. Davis CoPilot then sends the user prompt, the relevant data fragments, and some examples of field values observed in your environment to Microsoft Azure OpenAI for processing.
Having environment-aware queries enabled allows Davis CoPilot to identify unique data fields and custom metrics in your environment and helps you do your analysis by combining your prompt with the relevant, unique data fields and types.
Let's assume you're tracking travel bookings for new trips. In this case, you'd want to track:
With this in mind, you could give Davis CoPilot the following command: "Show me the average money made and the price reduction for new trips, over the last month".
If you have environment-aware queries enabled, the following DQL will be generated, providing you with results relevant to your environment:
fetch bizevents , from:now() – 30d| filter event.type == "new trip"| makeTimeseries interval:1h, {profit= avg(profit), discount= avg(discount)}
Davis CoPilot is capable of inferring that "money made" refers to the profit field, and that "price reduction" refers to the discount field, even if your prompt didn't use the correct field names.
If you don't have environment-aware queries enabled, Davis CoPilot will try to refer to the fields by the names you provided. The following, incorrect DQL would be generated since the fields don't exist in your environment:
fetch bizevents, from:now() – 30d| filter event.type == "new trip"| makeTimeseries interval:1h, {avg_money_made = avg(money_made), avg_price_reduction = avg(price_reduction)}
Alternatively, you could ask Davis CoPilot the following question: "On average, how long does it take customers to book new trips?"
If you have environment-aware queries enabled, the following DQL will be generated, providing you with results relevant to your environment:
timeseries avg(new_trip_booking_duration)
If you don't have environment-aware queries enabled, you'll likely get an error message since Davis CoPilot would be unable to correctly map your question to your custom metric key. In this case, Davis CoPilot can't generate a valid DQL query because it can't find a matching generic, built-in metric.
Since Davis CoPilot respects user privileges, it may provide different responses to different users based on their access rights.
Davis CoPilot NL2DQL response generation can be summarized in 4 steps.
If you have enabled environment-aware queries, the relevant data fragments will be used enrich the prompt alongside Dynatrace-owned content.
To help us improve Davis CoPilot, you can provide feedback directly from your notebook or dashboard. Under the prompt box:
Do not share personal or confidential information in your feedback.