Skip to content

Commit

Permalink
Remove MetricProcessor from the SDK spec (for now) (#1840)
Browse files Browse the repository at this point in the history
* Remove MetricProcessor from the SDK spec (for now)

* fix typo

* fix links

* Update specification/metrics/sdk.md

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
Co-authored-by: Joshua MacDonald <jmacd@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 5, 2021
1 parent 7cef355 commit c62fae8
Showing 1 changed file with 22 additions and 31 deletions.
53 changes: 22 additions & 31 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Table of Contents
* [MeterProvider](#meterprovider)
* [Attribute Limits](#attribute-limits)
* [MeasurementProcessor](#measurementprocessor)
* [MetricProcessor](#metricprocessor)
* [MetricExporter](#metricexporter)
* [Push Metric Exporter](#push-metric-exporter)
* [Pull Metric Exporter](#pull-metric-exporter)
Expand All @@ -44,13 +43,13 @@ to create an
instance which is stored on the created `Meter`.

Configuration (i.e., [MeasurementProcessors](#measurementprocessor),
[MetricProcessors](#metricprocessor), [MetricExporters](#metricexporter) and
[`Views`](#view)) MUST be managed solely by the `MeterProvider` and the SDK MUST
provide a way to configure all options that are implemented by the SDK. This MAY be done at the
time of MeterProvider creation if appropriate.
[MetricExporters](#metricexporter) and [`Views`](#view)) MUST be managed solely
by the `MeterProvider` and the SDK MUST provide a way to configure all options
that are implemented by the SDK. This MAY be done at the time of MeterProvider
creation if appropriate.

The `MeterProvider` MAY provide methods to update the configuration. If
configuration is updated (e.g., adding a `MetricProcessor`), the updated
configuration is updated (e.g., adding a `MeasurementProcessor`), the updated
configuration MUST also apply to all already returned `Meters` (i.e. it MUST NOT
matter whether a `Meter` was obtained from the `MeterProvider` before or after
the configuration change). Note: Implementation-wise, this could mean that
Expand Down Expand Up @@ -256,31 +255,6 @@ active span](../trace/api.md#context-interaction)).
+------------------+
```

## MetricProcessor

`MetricProcessor` is an interface which allows hooks for [pre-aggregated metrics
data](./datamodel.md#timeseries-model).

Built-in metric processors are responsible for batching and conversion of
metrics data to exportable representation and passing batches to exporters.

The following diagram shows `MetricProcessor`'s relationship to other components
in the SDK:

```text
+-----------------+ +-----------------+ +-----------------------+
| | Metrics... | | Metrics... | |
| In-memory state +------------> MetricProcessor +------------> MetricExporter (push) +--> Another process
| | | | | |
+-----------------+ +-----------------+ +-----------------------+
+-----------------+ +-----------------+ +-----------------------+
| | Metrics... | | Metrics... | |
| In-memory state +------------> MetricProcessor +------------> MetricExporter (pull) +--> Another process (scraper)
| | | | | |
+-----------------+ +-----------------+ +-----------------------+
```

## MetricExporter

`MetricExporter` defines the interface that protocol-specific exporters MUST
Expand All @@ -291,6 +265,23 @@ The goal of the interface is to minimize burden of implementation for
protocol-dependent telemetry exporters. The protocol exporter is expected to be
primarily a simple telemetry data encoder and transmitter.

The following diagram shows `MetricExporter`'s relationship to other components
in the SDK:

```text
+-----------------+ +-----------------------+
| | Metrics... | |
| In-memory state +------------> MetricExporter (push) +--> Another process
| | | |
+-----------------+ +-----------------------+
+-----------------+ +-----------------------+
| | Metrics... | |
| In-memory state +------------> MetricExporter (pull) +--> Another process (scraper)
| | | |
+-----------------+ +-----------------------+
```

Metric Exporter has access to the [pre-aggregated metrics
data](./datamodel.md#timeseries-model).

Expand Down

0 comments on commit c62fae8

Please sign in to comment.