OBSERVABILITY PLATFORM
Partitions

Partitions

This feature isn’t available to all Chronosphere Observability Platform users and might not be visible in your app. For information about enabling this feature in your environment, contact Chronosphere Support.

To effectively manage your log data, you need to separate, or partition data into meaningful slices that map to your business. Partitions provide a consistent structure for attributing usage and costs to the appropriate owners in your organization so they can isolate and control independent their parts of the business.

Partition hierarchy

Partitions are hierarchical, which lets you model the ownership structure of your organization. A global partition is created by default, and captures all consumption. Individual teams can create distinct partitions, with child partitions for individual services and environments.

All created partitions are children of the global partition, and each created partition has a default partition to collect any traffic not explicitly captured by other partitions. Default partitions are created automatically, and ensure that all consumption is accounted for at every level and sums correctly into parent partitions.

The maximum number of partitions you can create is 100, with up to five levels of child partitions.

The following diagram depicts the hierarchy of partitions stemming from the global partition. Two created partitions are children of the global partition: one for the ordering_team and another for the auth-team. Each of those partitions have child partitions for each team’s individual service, with additional child partitions for prod, staging, and dev environments.

View partitions

Select from the following methods to view and filter available partitions.

To use Chronoctl to return all partitions, use the chronoctl consumption-config read command:

chronoctl consumption-config read

Create partitions

Select from the following methods to create partitions.

To use Chronoctl to create a partitions, use the chronoctl consumption-config create command:

chronoctl consumption-config create
  1. Run the following command to generate a sample partition configuration you can use as a template:

    chronoctl consumption-config scaffold

    In the template, kind: ConsumptionConfig defines an individual partition.

  2. With a completed definition, submit it with:

    chronoctl consumption-config create -f FILE_NAME

    Replace FILE_NAME with the name of the YAML definition file you want to use.

See the Chronoctl partition example for a completed partition definition.

Next steps

After creating a partition, use the Logging License Consumption dashboard to analyze consumption trends across partitions to understand what’s driving growth and detect unwanted spikes.

Chronoctl partition example

The following Chronoctl example implements the partition structure outlined in the diagram that describes log partitions at the start of this page.

api_version: v1/config
kind: ConsumptionConfig
spec:
  partitions:
    - name: "Ordering Service"
      slug: "ordering-service"
      filters:
        operator: "IN"
        conditions:
          log_filter:
            query: "service = 'ordering'"
      partitions:
        - name: "Prod"
          slug: "prod"
          filters:
            operator: "IN"
            conditions:
              log_filter:
                query: "env = 'prod'"
        - name: "Staging"
          slug: "staging"
          filters:
            operator: "IN"
            conditions:
              log_filter:
                query: "env = 'staging'"
        - name: "Dev"
          slug: "dev"
          filters:
            operator: "IN"
            conditions:
              log_filter:
                query: "env = 'dev'"
 
    - name: "Auth Service"
      slug: "auth-service"
      filters:
        operator: "IN"
        conditions:
          log_filter:
            query: "service = 'auth'"
      partitions:
        - name: "Prod"
          slug: "prod"
          filters:
            operator: "IN"
            conditions:
              log_filter:
                query: "env = 'prod'"
        - name: "Staging"
          slug: "staging"
          filters:
            operator: "IN"
            conditions:
              log_filter:
                query: "env = 'staging'"
        - name: "Dev"
          slug: "dev"
          filters:
            operator: "IN"
            conditions:
              log_filter:
                query: "env = 'dev'"

Terraform partition example

The following Terraform example implements the partition structure outlined in the diagram that describes log partitions at the start of this page.

resource "chronosphere_consumption_config" "example" {
  partition {
    name = "Ordering Service"
    slug = "ordering-service"
    filter {
      operator = "IN"
      condition {
        log_filter {
          query = "service = 'ordering'"
        }
      }
    }
 
    partition {
      name = "Prod"
      slug = "prod"
      filter {
        operator = "IN"
        condition {
          log_filter {
            query = "env = 'prod'"
          }
        }
      }
    }
 
    partition {
      name = "Staging"
      slug = "staging"
      filter {
        operator = "IN"
        condition {
          log_filter {
            query = "env = 'staging'"
          }
        }
      }
    }
 
    partition {
      name = "Dev"
      slug = "dev"
      filter {
        operator = "IN"
        condition {
          log_filter {
            query = "env = 'dev'"
          }
        }
      }
    }
  }
 
  partition {
    name = "Auth Service"
    slug = "auth-service"
    filter {
      operator = "IN"
      condition {
        log_filter {
          query = "service = 'auth'"
        }
      }
    }
 
    partition {
      name = "Prod"
      slug = "prod"
      filter {
        operator = "IN"
        condition {
          log_filter {
            query = "env = 'prod'"
          }
        }
      }
    }
 
    partition {
      name = "Staging"
      slug = "staging"
      filter {
        operator = "IN"
        condition {
          log_filter {
            query = "env = 'staging'"
          }
        }
      }
    }
 
    partition {
      name = "Dev"
      slug = "dev"
      filter {
        operator = "IN"
        condition {
          log_filter {
            query = "env = 'dev'"
          }
        }
      }
    }
  }
}

Update partitions

Select from the following methods to update log partitions.

To update partitions with Chronoctl, use the consumption-config update command:

chronoctl consumption-config update
  1. Update the partition definition file.

  2. Run the following command to submit the changes:

    chronoctl consumption-config update -f FILE_NAME.yaml

    Replace FILE_NAME with the name of the YAML definition file you want to use.

Delete partitions

Select from the following methods to delete log partitions.

Users can modify Terraform-managed resources only by using Terraform. Learn more.

To delete a partition with Chronoctl, use the chronoctl consumption-config delete command:

chronoctl consumption-config delete SLUG

Replace SLUG with the slug of the partition you want to delete.

For example, to delete a partition with the slug ordering-service-production:

chronoctl consumption-config delete ordering-service-production