- the formula to add when you create your Calculated Field
- an example query that used your Calculated Field when building a query; most of these use three clauses
SELECT, WHERE, and GROUP BY clauses, which are located at the top of the Query Builder display.
SELECT: Performs a calculation and displays a corresponding graph over time. MostSELECTqueries return a line graph while theHEATMAPvisualization shows the distribution of data over timeWHERE: Filters based on attribute parameter(s)GROUP BY: Groups fields by attribute parameter(s)
Determine the percentage of successful requests
Determine the percentage of successful requests by using a Calculated Field. Create a Calculated Field and enter the following function in the Calculated Field Editor:success-rate-calculated-field:
Find failures in sequential events
Monitor the health of a pipeline-style process by using a Calculated Field that tells the number of requests that failed to complete. Create a Calculated Field and enter the following function in the Calculated Field Editor:failed-pipeline-step-calculated-field:
If there are an equal number of
pipeline-step-1 events as pipeline-step-2 events, then the SUM will be zero.
When there are fewer pipeline-step-2 events than pipeline-step-1 events, then the SUM will be a positive integer.
Find traces with missing root spans
Find traces with missing root spans by creating a Calculated Field and entering the following function in the Calculated Field Editor:check-trace-parent-calculated-field:
The sum will return at least
1 if you have a root span and 0 if you have no root span.
Use regular expressions to select Kubernetes deployment metrics
To select Kubernetes deployment metrics, create a Calculated Field and enter the following function in the Calculated Field Editor:k8s.deploy.name.calculated.field:
Any other metric operations can be used instead of SELECT
MAX() in this query example.Compare window sizes to screen sizes
For front end developers, compare window sizes to screen sizes using a Calculated Field. Create a Calculated Field and enter the following function in the Calculated Field Editor:screen-used-calculated-field:
After running the query, if most of the data in the heatmap clusters in a band closer to the top of the display, then most users are already using the majority of their screens.
Group incoming data by content size
Group, or bucket, incoming data by content size using a Calculated Field. It is helpful to know that the IF Operator works very similar to aswitch or case statement in other languages, allowing you to provide multiple outputs based on many separate conditions.
Create a Calculated Field and enter the following function in the Calculated Field Editor:
content-length-bucket-calculated-field:
This query can help answer questions about whether larger file uploads fail more often, and give a general idea of the distribution of file sizes across uploads.
Derive browser version from the user-agent header
Derive the browser version from the user-agent header by using a Calculated Field. Create a Calculated Field and enter the following function in the Calculated Field Editor:browser-version-calculated-field:
This query can help you answer questions about whether requests from particular browser types are failing more frequently.
Derive browser name from the user-agent header
Derive the browser name from the user-agent header by using a Calculated Field. Create a Calculated Field and enter the following function in the Calculated Field Editor:browser-name-calculated-field:
This query can help you answer questions about whether requests from particular browser types are failing more frequently.
Derive browser operating system from the user-agent header
Derive the browser operating system (OS) from the user-agent header by using a Calculated Field. Create a Calculated Field and enter the following function in the Calculated Field Editor:browser-os-calculated-field:
This query can help you answer questions about whether requests from particular browser types are failing more frequently.
Derive browser architecture from user-agent header
Derive browser architecture from the user-agent header by using a Calculated Field. Create a Calculated Field and enter the following function in the Calculated Field Editor:This Calculated Field example assumes that Android has Arm architecture.
browser-architecture-calculated-field:
This query can help you answer questions about whether requests from particular browser types are failing more frequently.