Skip to content

Commit

Permalink
Add clarification on the no-op nature of the metric API. (open-teleme…
Browse files Browse the repository at this point in the history
…try#829)

* Add clarification on the no-op nature of the metric API.

* Update specification/metrics/api.md

Co-authored-by: Armin Ruech <[email protected]>

Co-authored-by: Armin Ruech <[email protected]>
  • Loading branch information
jkwatson and arminru authored Aug 19, 2020
1 parent 7d3b962 commit a39343c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@ logging systems. For this reason, [OpenTelemetry requires a separation of the
API from the SDK](../library-guidelines.md#requirements), so that different SDKs
can be configured at run time.

### Behavior of the API in the absence of an installed SDK

In the absence of an installed Metrics SDK, the Metrics API MUST consist only
of no-ops. None of the calls on any part of the API can have any side effects
or do anything meaningful. Meters MUST return no-op implementations of any
instruments. From a user's perspective, calls to these should be ignored without raising errors
(i.e., *no* `null` references MUST be returned in languages where accessing these results in errors).
The API MUST NOT throw exceptions on any calls made to it.

### Measurements

The term _capture_ is used in this document to describe the action
Expand Down

0 comments on commit a39343c

Please sign in to comment.