From 322cac1cb5f8ec07cf7d928d0ea7ac9b22b3b32d Mon Sep 17 00:00:00 2001 From: Diego Hurtado Date: Tue, 26 Oct 2021 18:28:26 +0200 Subject: [PATCH] Add metrics compliance matrix (#1956) * Add metrics compliance matrix * Remove table generator * Update spec-compliance-matrix.md Co-authored-by: Reiley Yang * Update spec-compliance-matrix.md Co-authored-by: Reiley Yang * Remove requirement * Update spec-compliance-matrix.md Co-authored-by: Reiley Yang * Update spec-compliance-matrix.md Co-authored-by: Reiley Yang * Update spec-compliance-matrix.md Co-authored-by: Reiley Yang * Update spec-compliance-matrix.md Co-authored-by: Reiley Yang * Update spec-compliance-matrix.md Co-authored-by: Reiley Yang * Update spec-compliance-matrix.md Co-authored-by: Reiley Yang * Update spec-compliance-matrix.md Co-authored-by: Reiley Yang * Update spec-compliance-matrix.md Co-authored-by: Armin Ruech * Update spec-compliance-matrix.md Co-authored-by: Armin Ruech * Update spec-compliance-matrix.md Co-authored-by: Joshua MacDonald * Fix document status path * Add some requested fixes Co-authored-by: Reiley Yang Co-authored-by: Joshua MacDonald Co-authored-by: Armin Ruech Co-authored-by: Josh Suereth --- spec-compliance-matrix.md | 91 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 88 insertions(+), 3 deletions(-) diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index ef08b393c02..d40274ffac9 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -90,9 +90,94 @@ formats is required. Implementing more than one format is optional. ## Metrics -|Feature |Optional|Go|Java|JS |Python|Ruby|Erlang|PHP|Rust|C++|.NET|Swift| -|----------------------------------------------|--------|--|----|---|------|----|------|---|----|---|----|-----| -|TBD| +**Status**: [Experimental](./specification/document-status.md) + +Disclaimer: this list of features is still a work in progress, please refer to the specification if in any doubt. + +| Feature | Optional | Go | Java | JS | Python | Ruby | Erlang | PHP | Rust | C++ | .NET | Swift | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|----|------|----|--------|------|--------|-----|------|-----|------|-------| +| The API provides a way to set and get a global default `MeterProvider`. | | | | | | | | | | | | | +| It is possible to create any number of `MeterProvider`s. | | | | | | | | | | | | | +| `MeterProvider` provides a way to get a `Meter`. | | | | | | | | | | | | | +| `get_meter` accepts name, `version` and `schema_url`. | | | | | | | | | | | | | +| When an invalid `name` is specified a working `Meter` implementation is returned as a fallback. | | | | | | | | | | | | | +| The fallback `Meter` `name` property keeps its original invalid value. | | | | | | | | | | | | | +| New configuration applies to previously returned `Meter`s. | | | | | | | | | | | | | +| The meter provides functions to create a new `Counter`. | | | | | | | | | | | | | +| The meter provides functions to create a new `AsynchronousCounter`. | | | | | | | | | | | | | +| The meter provides functions to create a new `Histogram`. | | | | | | | | | | | | | +| The meter provides functions to create a new `AsynchronousGauge`. | | | | | | | | | | | | | +| The meter provides functions to create a new `UpDownCounter`. | | | | | | | | | | | | | +| The meter provides functions to create a new `AsynchronousUpDownCounter`. | | | | | | | | | | | | | +| Instruments have `name` | | | | | | | | | | | | | +| Instruments have kind. | | | | | | | | | | | | | +| Instruments have an optional unit of measure. | | | | | | | | | | | | | +| Instruments have an optional description. | | | | | | | | | | | | | +| An error is returned when multiple instruments are registered under the same `Meter` using the same `name`. | | | | | | | | | | | | | +| It is possible to register two instruments with same `name` under different `Meter`s. | | | | | | | | | | | | | +| Instrument names conform to the specified syntax. | | | | | | | | | | | | | +| Instrument units conform to the specified syntax. | | | | | | | | | | | | | +| Instrument descriptions conform to the specified syntax. | | | | | | | | | | | | | +| `create_counter` returns a `Counter` object. | | | | | | | | | | | | | +| The API for `Counter` accepts the name of the instrument. | | | | | | | | | | | | | +| The API for `Counter` accepts the unit of the instrument. | | | | | | | | | | | | | +| The API for `Counter` accepts the description of the instrument. | | | | | | | | | | | | | +| `Counter` has an `add` method. | | | | | | | | | | | | | +| The `add` method returns `null` (this can vary depending on the language). | | | | | | | | | | | | | +| The `add` method accepts optional attributes. | | | | | | | | | | | | | +| The `add` method accepts the increment amount. | | | | | | | | | | | | | +| The `add` method of `Counter` accepts only positive amounts. | | | | | | | | | | | | | +| `create_asynchronous_counter` returns an `AsynchronousCounter` object. | | | | | | | | | | | | | +| The API for `AsynchronousCounter` accepts the name of the instrument. | | | | | | | | | | | | | +| The API for `AsynchronousCounter` accepts the unit of the instrument. | | | | | | | | | | | | | +| The API for `AsynchronousCounter` accepts the description of the instrument. | | | | | | | | | | | | | +| The API for `AsynchronousCounter` accepts a callback. | | | | | | | | | | | | | +| `AsynchronousCounter` has an `add` method. | | | | | | | | | | | | | +| The `add` method does not return a value or returns a `null` value. | | | | | | | | | | | | | +| The `add` method accepts optional attributes. | | | | | | | | | | | | | +| The `add` method accepts the increment amount. | | | | | | | | | | | | | +| The `add` method accepts only positive amounts. | | | | | | | | | | | | | +| The callback function of an `Asynchronous` instrument does not block indefinitely. | | | | | | | | | | | | | +| The callback function reports `Measurement`s. | | | | | | | | | | | | | +| There is a way to pass state to the callback. | | | | | | | | | | | | | +| All methods of `MeterProvider` are safe to be called concurrently. | | | | | | | | | | | | | +| All methods of `Meter` are safe to be called concurrently. | | | | | | | | | | | | | +| All methods of any instrument are safe to be called concurrently. | | | | | | | | | | | | | +| `MeterProvider` allows a `Resource` to be specified. | | | | | | | | | | | | | +| A specified `Resource` can be associated with all the produced metrics from any `Meter` from the `MeterProvider`. | | | | | | | | | | | | | +| The supplied `name`, `version` and `schema_url` arguments passed to the `MeterProvider` are used to create an `InstrumentationLibrary` instance stored in the `Meter`. | | | | | | | | | | | | | +| Configuration can be managed by the `MeterProvider`. | | | | | | | | | | | | | +| The `MeterProvider` provides methods to update the configuration | | | | | | | | | | | | | +| The updated configuration applies to all already returned `Meter`s. | | | | | | | | | | | | | +| There is a way to register `View`s with a `MeterProvider`. | | | | | | | | | | | | | +| The `View` instrument selection criteria is as specified. | | | | | | | | | | | | | +| The name of the `View` can be specified. | | | | | | | | | | | | | +| The configuration for the metrics stream is as specified. | | | | | | | | | | | | | +| The specified logic is used to process `Measurement`s made by an instrument. | | | | | | | | | | | | | +| The `None` aggregation is available. | | | | | | | | | | | | | +| The `None` aggregation drops all measurements. | | | | | | | | | | | | | +| The `Default` aggregation is available. | | | | | | | | | | | | | +| The `Default` aggregation uses the specified aggregation. | | | | | | | | | | | | | +| The `Sum` aggregation is available. | | | | | | | | | | | | | +| The `Sum` aggregation performs as specified. | | | | | | | | | | | | | +| The `LastValue` aggregation is available. | | | | | | | | | | | | | +| The `LastValue` aggregation performs as specified. | | | | | | | | | | | | | +| The `Histogram` aggregation is available. | | | | | | | | | | | | | +| The `Histogram` aggregation performs as specified. | | | | | | | | | | | | | +| The explicit bucket `Histogram` aggregation is available. | | | | | | | | | | | | | +| The explicit bucket `Histogram` aggregation performs as specified. | | | | | | | | | | | | | +| A `MeasurementProcessor` allows hooks when a Measurement is recorded by an instrument. | | | | | | | | | | | | | +| A `MeasurementProcessor` has access to The Measurement, Instrument and Resource. | | | | | | | | | | | | | +| If a Measurement is reported by a synchronous Instrument, Then a `MeasurementProcessor` has access to the `Baggage`, `Context` and `Span` associated with the `Measurement`. | | | | | | | | | | | | | +| The metrics exporter has access to the pre aggregated metrics data. | | | | | | | | | | | | | +| The metrics exporter `export` function can not be called concurrently from the same exporter instance. | | | | | | | | | | | | | +| The metrics exporter `export` function does not block indefinitely. | | | | | | | | | | | | | +| The metrics exporter `export` function receives a batch of metrics. | | | | | | | | | | | | | +| The metrics exporter `export` function returns `Success` or `Failure`. | | | | | | | | | | | | | +| The metrics exporter provides a `ForceFlush` function. | | | | | | | | | | | | | +| The metrics exporter `ForceFlush` can inform the caller wether it succeeded, failed or timed out. | | | | | | | | | | | | | +| The metrics exporter provides a `shutdown` function. | | | | | | | | | | | | | +| The metrics exporter `shutdown` function do not block indefinitely. | | | | | | | | | | | | | ## Resource