Menu
Grafana Cloud

Configure logs correlation

In Asserts, you can drill down into the logs that are specific to an entity and the currently selected time window. To enable this correlation, Asserts requires a configuration that maps the properties of your entities or the labels of the assertion to the labels used in your logging store, enabling seamless log exploration.

The following video shows you how to create a custom mapping configuration to correlate logs:

Configuration inputs

To create a logs configuration, you must provide the following information:

  1. Environment: Specifies the environment for which this configuration is applicable
  2. Site: Specifies the geographical site for which this configuration is applicable, for example, us-east-1, eu-west-2
  3. Logs Data Source: The specific Grafana data source that stores the logs
  4. Log Label Mappings: A set of one or more key-value pairs that define the mapping between entity properties/metric-based insights to log labels

Steps

Complete the following steps to create a new logs configuration:

  1. Navigate to Observability > Asserts > Configuration > Logs.

  2. Click + Add logs config.

  3. Enter a name for the configuration.

  4. In the Environments field, select one or more environments for this configuration.

  5. In the Sites field, select one or more sites for this configuration.

  6. In the Data source field, select the logs data source.

  7. Configure the log label mappings:

    This is the most critical step. You must create a mapping that connects entity properties to log labels.

    You can add multiple mappings as needed.

    For each mapping, you must define:

    • Entity/Insight Label: Enter the name of the property from the entity or the insight, for example, service.
    • Logs Label: Enter the corresponding label name as it appears in your logs, for example, service_name.
  8. Click Save configuration.

The system now uses this configuration to automatically generate queries, allowing you to view correlated logs from the Grafana data source as you are inspecting insights for entities in the specified environment and site.