Grafana Cloud

Configure segments

Segmentation allows you to group log streams by team, service, department, or system. This team-centric approach helps you organize and analyze Adaptive Logs based on how your organization structures ownership and responsibility.

You can create and manage segments using the UI.

Segments

Think of a segment as a container for a specific grouping of log streams. You define this grouping based on a label and values, or selectors.

Each segment has a:

  • Name:

    Represents a human-readable name for this label values grouping.

  • Selector or label, and values:

    Tells Adaptive Logs which log streams belong to the segment.

    Note

    • Only one label matcher is allowed. For example, ({team=“billing”}).

    • All segments must reference the same label name. Creating a segment with a different label name results in an error.

    • Only equality matchers, for example, ({team=“billing”}), or multi-literal regular expression matchers, for example, ({team=~(alerting|alerting-dev)}), are allowed.

Segments classify log streams for filtering, review, and analysis. Drop rate configuration is managed at the pattern level.

Segmentation workflow

  1. Using the UI, create segments and give them descriptive names.

  2. Add the label and values that determine which log streams belong to each segment.

  3. Save the segment configuration.

  4. Review patterns and adjust drop rates at the pattern level as needed.

Segments organize log streams, while drop rate adjustments are applied within patterns.

Create segments using the UI

Create, update, and manage segments through the Grafana user interface.

To create a new segment, complete the following steps.

  1. Navigate to Adaptive Logs > Configuration.

  2. Click Add new segment.

  3. Enter a name.

    Give your segment a descriptive name that clearly identifies the team it applies to.

  4. Enter a label.

    Specify the log stream label that distinguishes the metrics belonging to a particular team. In the context of Kubernetes, this is often namespace.

Note

Once you choose a label for segmentation, that label is used for all segments. Only one label can be used across all segments.

  1. Enter a value.

    Define the criteria for matching the label you specified. This is where you tell Grafana which values of that label correspond to the current team’s log streams. In the UI, you can select values using a dropdown. Enter the exact name of the Kubernetes namespaces or label values for the team (for example, web-frontend, web-backend). If a team owns multiple namespaces, you can enter multiple values.

Note

Each value can only be used once. Therefore, once a value is added to a segment, it cannot be used in another.

  1. Click Add.