Skip to content

Commit

Permalink
Restructure the sync/async API as sub-sections (#3073)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias authored Jan 10, 2023
1 parent 7e9ba16 commit ffddc28
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ linkTitle: API
+ [Instrument unit](#instrument-unit)
+ [Instrument description](#instrument-description)
+ [Synchronous and Asynchronous instruments](#synchronous-and-asynchronous-instruments)
+ [Synchronous Instrument API](#synchronous-instrument-api)
+ [Asynchronous Instrument API](#asynchronous-instrument-api)
- [Synchronous Instrument API](#synchronous-instrument-api)
- [Asynchronous Instrument API](#asynchronous-instrument-api)
* [Counter](#counter)
+ [Counter creation](#counter-creation)
+ [Counter operations](#counter-operations)
Expand Down Expand Up @@ -295,11 +295,11 @@ instrument. It MUST be treated as an opaque string from the API and SDK.
* It MUST support at least 1023 characters. [OpenTelemetry
API](../overview.md#api) authors MAY decide if they want to support more.

#### Synchronous and Asynchronous instruments

Instruments are categorized on whether they are synchronous or
asynchronous:

#### Synchronous and Asynchronous instruments

* Synchronous instruments (e.g. [Counter](#counter)) are meant to be invoked
inline with application/business processing logic. For example, an HTTP client
could use a Counter to record the number of bytes it has received.
Expand All @@ -318,7 +318,7 @@ Please note that the term *synchronous* and *asynchronous* have nothing to do
with the [asynchronous
pattern](https://en.wikipedia.org/wiki/Asynchronous_method_invocation).

#### Synchronous Instrument API
##### Synchronous Instrument API

The API to construct synchronous instruments MUST accept the following parameters:

Expand All @@ -329,7 +329,7 @@ The API to construct synchronous instruments MUST accept the following parameter
* An optional `description`, following the [instrument description
rule](#instrument-description).

#### Asynchronous Instrument API
##### Asynchronous Instrument API

Asynchronous instruments have associated `callback` functions which
are responsible for reporting [Measurement](#measurement)s. Callback
Expand Down

0 comments on commit ffddc28

Please sign in to comment.