Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ release.

- Add development `maxExportBatchSize` parameter to Periodic exporting MetricReader.
([#4895](https://github.com/open-telemetry/opentelemetry-specification/pull/4895))
- Add development `exclude_attribute_keys` parameter to Stream Configuration.
([#4951](https://github.com/open-telemetry/opentelemetry-specification/pull/4951))
- Add development `Exclude_Attributes` parameter to Instrument Advisory.
([#4951](https://github.com/open-telemetry/opentelemetry-specification/pull/4951))

### Logs

Expand Down
10 changes: 10 additions & 0 deletions specification/metrics/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ weight: 1
+ [Instrument advisory parameters](#instrument-advisory-parameters)
- [Instrument advisory parameter: `ExplicitBucketBoundaries`](#instrument-advisory-parameter-explicitbucketboundaries)
- [Instrument advisory parameter: `Attributes`](#instrument-advisory-parameter-attributes)
- [Instrument advisory parameter: `ExcludeAttributes`](#instrument-advisory-parameter-excludeattributes)
+ [Synchronous and Asynchronous instruments](#synchronous-and-asynchronous-instruments)
- [Synchronous Instrument API](#synchronous-instrument-api)
- [Asynchronous Instrument API](#asynchronous-instrument-api)
Expand Down Expand Up @@ -276,6 +277,15 @@ Applies to all instrument types.
`Attributes` (a list of [attribute keys](../common/README.md#attribute)) is
the recommended set of attribute keys to be used for the resulting metrics.

##### Instrument advisory parameter: `ExcludeAttributes`

**Status**: [Development](../document-status.md)

Applies to all instrument types.

`ExcludeAttributes` (a list of [attribute keys](../common/README.md#attribute)) is
the recommended set of attribute keys to not be used for the resulting metrics.

#### Synchronous and Asynchronous instruments

Instruments are categorized on whether they are synchronous or
Expand Down
29 changes: 27 additions & 2 deletions specification/metrics/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ weight: 3
* [Instrument advisory parameters](#instrument-advisory-parameters)
+ [Instrument advisory parameter: `ExplicitBucketBoundaries`](#instrument-advisory-parameter-explicitbucketboundaries)
+ [Instrument advisory parameter: `Attributes`](#instrument-advisory-parameter-attributes)
+ [Instrument advisory parameter: `ExcludeAttributes`](#instrument-advisory-parameter-excludeattributes)
* [Instrument enabled](#instrument-enabled)
- [Attribute limits](#attribute-limits)
- [Exemplar](#exemplar)
Expand Down Expand Up @@ -375,13 +376,22 @@ The SDK MUST accept the following stream configuration parameters:
parameter configured on the instrument instead. If the `Attributes`
advisory parameter is absent, all attributes MUST be kept.

Additionally, implementations SHOULD support configuring an exclude-list of
attribute keys. The exclude-list contains attribute keys that identify the
* `exlude_attribute_keys`: This is, at a minimum, an exclude-list of attribute keys for
measurements captured in the metric stream.
The exclude-list contains attribute keys that identify the
attributes that MUST be excluded, all other attributes MUST be kept. If an
attribute key is both included and excluded, the SDK MAY fail fast in
accordance with initialization [error handling
principles](../error-handling.md#basic-error-handling-principles).

Users can provide `exclude_attribute_keys`, but it is up to their discretion.
Therefore, the stream configuration parameter needs to be structured to
accept `exclude_attribute_keys`, but MUST NOT obligate a user to provide them.
If the user does not provide any value, the SDK SHOULD use
the [`Exclude Attributes`](./api.md#instrument-advisory-parameters) advisory
parameter configured on the instrument instead. If the `Exclude Attributes`
advisory parameter is absent, all attributes MUST be kept.

* `aggregation`: The name of an [aggregation](#aggregation) function to use in
aggregating the metric stream data.

Expand Down Expand Up @@ -1024,6 +1034,21 @@ If no View is configured, or if a matching view does not specify attribute keys,
the advisory parameter should be used. If neither is provided, all attributes
must be retained.

#### Instrument advisory parameter: `ExcludeAttributes`

**Status**: [Development](../document-status.md)

This advisory parameter applies to all aggregations.

`ExcludeAttributes` (a list of [attribute keys](../common/README.md#attribute))
specifies the recommended set of attribute keys not to be used for measurements to
produce a metric stream.

If the user has provided attribute keys via View(s), those keys take precedence.
If no View is configured, or if a matching view does not specify exclude attribute keys,
the advisory parameter should be used. If neither is provided, no attributes
must be removed.

### Instrument enabled

The synchronous instrument [`Enabled`](./api.md#enabled) MUST return `false`
Expand Down
Loading