# MetricReader configuration scenarios

These examples show how to customize the metrics that are output by the SDK using configuration on metric readers. There are multiple examples:

- preferred_aggregation.py: Shows how to configure the preferred aggregation for metric instrument types.

- preferred_temporality.py: Shows how to configure the preferred temporality for metric instrument types.

- preferred_exemplarfilter.py: Shows how to configure the exemplar filter.

- synchronous_gauge_read.py: Shows how to use `PeriodicExportingMetricReader` in a synchronous manner to explicitly control the collection of metrics.

The source files of these examples are available here.

## Installation

    pip install -r requirements.txt

## Run the Example

    python <example_name>.py

The output will be shown in the console.

## Useful links

- OpenTelemetry

- opentelemetry.metrics package