Shopper dataset based on data like services, customer
IDs, and tags that relate to your shopping app. Viewing that dataset provides a
snapshot of log data volume associated with the entire business unit related to your
shopping app.
After creating datasets, you can update your partitions to reference datasets instead
of using standalone partitions. Use log datasets when you need reusable slices of
data that are tracked consistently over time, especially for when you anticipate
referencing the same complex filters across multiple partitions, queries, or
controls.
View datasets
Select from the following methods to view and filter available datasets.- Chronoctl
- API
To use Chronoctl to return all datasets including
trace datasets (if enabled in your tenant), use the
To return log datasets only, add the To filter for a specific logs dataset, add the Replace
chronoctl datasets list command:type argument to the command and specify
LOGS:slugs argument to the command:SLUG with the slug of the dataset you want to
display.Create datasets
Use one of the following methods to create log datasets. Define and test your query in Logs Explorer, and then map that query to the resource you want to create. After creating a dataset, you can define a budget to allocate a percentage of your log license limit to each dataset. To create a dataset:-
Define a query in Logs Explorer that represents
the data you want included in the dataset. For example, the following query
returns all logs for the
shopper-serviceservice in theproduction-usenvironment: - After defining the underlying query, use one of the following methods to map the query to a dataset that represents the business unit you want to track log data for. See the Chronoctl YAML definition and the Terraform resource definition for examples.
- Chronoctl
- Terraform
- API
If you don’t already have a YAML configuration file, use the You can redirect the results (using the redirection operator
scaffold Chronoctl
parameter to generate a template for a specific resource type:>) to a file for
editing.-
Run the following command to generate a sample dataset configuration you can use
as a template:
In the template,
kind: Datasetdefines an individual dataset. -
With a completed definition, submit it with:
Replace
FILE_NAMEwith the name of the YAML definition file you want to use.
Next steps
After creating a dataset, update partitions to reference the slug of your dataset. You can then define budgets, which are optional shaping policies attached to a partition. Budgets provide guardrails to avoid runaway usage and overspending, while providing the flexibility to enforce accountability at the right level of ownership.Chronoctl dataset example
The following YAML definition consists of one dataset namedLogs for payment service in production US. This dataset includes a service named
shopper-service in the production-us environment.
You must escape quotation marks in the query field. For example, to specify
"shopper-service" as a value in your query, enter \"shopper-service\". The
query field accepts both AND and OR operators, but only one of these operator
types is permitted. You can use multiple instances of the same operator, such as
multiple AND or multiple OR operators.
Terraform dataset example
The following Terraform resource creates a dataset that Terraform refers to asshopper_production_us, with a human-readable name of
Logs for payment service in production US.
This dataset includes a service named shopper-service in the production-us
environment.
Update datasets
Select from the following methods to update log datasets.- Chronoctl
- Terraform
- API
- Update the datasets definition file.
-
Run the following command to submit the changes:
Replace
FILE_NAMEwith the name of the YAML definition file you want to use.
Delete datasets
Select from the following methods to delete log datasets.Users can modify Terraform-managed resources only by using Terraform.
Learn more.
- Chronoctl
- Terraform
- API
To delete a dataset with Chronoctl, use the Replace
chronoctl datasets delete
command:SLUG with the slug of the dataset you want to delete.For example, to delete a dataset with the slug log-shopping-service-production: