---
sidebar:
  label: roboto.domain.metrics
  order: 11
title: roboto.domain.metrics
---
Metrics: numeric values recorded for sessions under metric definitions, named quantities such as peak CPU usage.

A session holds at most one value per metric definition, and publishing another value replaces it. Use `MetricDefinition` to create metric definitions, and `Metric` to publish a session's values, query them, and aggregate them over calendar periods.

## Submodules

- [roboto.domain.metrics.metric](/docs/reference/python-sdk/roboto/domain/metrics/metric)
- [roboto.domain.metrics.record](/docs/reference/python-sdk/roboto/domain/metrics/record)

## Package Contents

- [AggregateMetricsRequest](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.AggregateMetricsRequest) (class): Request body for `Metric.aggregate`.

- [AggregationPeriod](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.AggregationPeriod) (class): Length of the calendar periods a metric aggregation groups data points into.

- [CreateMetricDefinitionRequest](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.CreateMetricDefinitionRequest) (class): Request body for `MetricDefinition.create`.

- [DayOfWeek](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.DayOfWeek) (class): Day of the week, such as the day an aggregation's weeks start on (`AggregateMetricsRequest.week_start`).

- [MAX_METRIC_GROUPS](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.MAX_METRIC_GROUPS) (data): `MAX_METRIC_GROUPS: int = 100`. Maximum number of named groups a grouped metric query or aggregation returns.

- [MAX_METRIC_LIST_RESULTS](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.MAX_METRIC_LIST_RESULTS) (data): `MAX_METRIC_LIST_RESULTS: int = 10000`. Maximum number of metric data points in one page of a query, or in one listing of a session's metrics.

- [Metric](/docs/reference/python-sdk/roboto/domain/metrics/metric#roboto.domain.metrics.metric.Metric) (class): A metric data point: one numeric value recorded for one session under a metric definition.

- [MetricDefinition](/docs/reference/python-sdk/roboto/domain/metrics/metric#roboto.domain.metrics.metric.MetricDefinition) (class): A metric definition: a named numeric quantity that an organization records for its sessions.

- [MetricDefinitionRecord](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.MetricDefinitionRecord) (class): Data record of a metric definition, as the Roboto API returns it.

- [MetricEntry](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.MetricEntry) (class): Metric name and value of one data point to publish.

- [MetricQueryPage](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.MetricQueryPage) (class): Response body of `Metric.query`: one page of metric data points.

- [MetricRecord](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.MetricRecord) (class): Data record of a metric data point, as the Roboto API returns it.

- [MetricTimeFilter](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.MetricTimeFilter) (class): Session time that places a metric data point in a query or aggregation window: the start or the end.

- [NumericAggregateMetricRecord](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.NumericAggregateMetricRecord) (class): Data record of a bucket of a numeric metric aggregation, as `Metric.aggregate` returns it.

- [NumericAggregateMetricsResponse](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.NumericAggregateMetricsResponse) (class): Response body of `Metric.aggregate`.

- [NumericAggregation](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.NumericAggregation) (class): Function a metric aggregation applies to the values of the data points in each bucket.

- [PublishMetricsRequest](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.PublishMetricsRequest) (class): Request body for `Metric.publish`.

- [QueryMetricsRequest](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.QueryMetricsRequest) (class): Request body for `Metric.query`.

- [UpdateMetricDefinitionRequest](/docs/reference/python-sdk/roboto/domain/metrics/record#roboto.domain.metrics.record.UpdateMetricDefinitionRequest) (class): Request body for `MetricDefinition.update`.
