Skip to content

Commit

Permalink
Add Context parameter to Enabled for synchronous metrics instruments
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Oct 15, 2024
1 parent 0a78571 commit 92747e9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,12 @@ To help users avoid performing computationally expensive operations when
recording measurements, [synchronous Instruments](#synchronous-instrument-api)
SHOULD provide this `Enabled` API.

There are currently no required parameters for this API. Parameters can be
added in the future, therefore, the API MUST be structured in a way for
parameters to be added.
The API SHOULD accept the following parameters:

- The [Context](../context/README.md) to be associated with the measurement.
When implicit Context is supported, then this parameter SHOULD be optional and
if unspecified then MUST use current Context.
When only explicit Context is supported, accepting this parameter is REQUIRED.

This API MUST return a language idiomatic boolean type. A returned value of
`true` means the instrument is enabled for the provided arguments, and a returned
Expand Down

0 comments on commit 92747e9

Please sign in to comment.