Skip to content

Commit

Permalink
View aggregation examples modified to remove unsupported things (#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
cijothomas authored Feb 4, 2022
1 parent 6bed0a9 commit 93d8388
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,17 @@ meter_provider
```python
# Counter X will be exported as cumulative sum
meter_provider
.add_view("X", aggregation=SumAggregation(CUMULATIVE))
.add_metric_reader(PeriodicExportingMetricReader(ConsoleExporter()))
.add_view("X", aggregation=SumAggregation())
.add_metric_reader(PeriodicExportingMetricReader(AggregationTemporality.CUMULATIVE, ConsoleExporter()))
```

```python
# Counter X will be exported as delta sum
# Histogram Y and Gauge Z will be exported with 2 attributes (a and b)
meter_provider
.add_view("X", aggregation=SumAggregation(DELTA))
.add_view("X", aggregation=SumAggregation())
.add_view("*", attribute_keys=["a", "b"])
.add_metric_reader(PeriodicExportingMetricReader(ConsoleExporter()))
.add_metric_reader(PeriodicExportingMetricReader(AggregationTemporality.DELTA, ConsoleExporter()))
```

### Aggregation
Expand Down

0 comments on commit 93d8388

Please sign in to comment.