Skip to content

Commit 2cbc29a

Browse files
committed
Review feedback
1 parent 5c644e7 commit 2cbc29a

3 files changed

Lines changed: 25 additions & 20 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ release.
2020
([#4895](https://github.com/open-telemetry/opentelemetry-specification/pull/4895))
2121
- Add development `exclude_attribute_keys` parameter to Stream Configuration.
2222
([#4951](https://github.com/open-telemetry/opentelemetry-specification/pull/4951))
23-
- Add development `Exclude_Attributes` parameter to Instrument Advisory.
23+
- Add development `include_attribute_keys` parameter to Stream Configuration.
2424
([#4951](https://github.com/open-telemetry/opentelemetry-specification/pull/4951))
2525

2626
### Logs

specification/metrics/api.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ weight: 1
2626
+ [Instrument advisory parameters](#instrument-advisory-parameters)
2727
- [Instrument advisory parameter: `ExplicitBucketBoundaries`](#instrument-advisory-parameter-explicitbucketboundaries)
2828
- [Instrument advisory parameter: `Attributes`](#instrument-advisory-parameter-attributes)
29-
- [Instrument advisory parameter: `ExcludeAttributes`](#instrument-advisory-parameter-excludeattributes)
3029
+ [Synchronous and Asynchronous instruments](#synchronous-and-asynchronous-instruments)
3130
- [Synchronous Instrument API](#synchronous-instrument-api)
3231
- [Asynchronous Instrument API](#asynchronous-instrument-api)
@@ -277,15 +276,6 @@ Applies to all instrument types.
277276
`Attributes` (a list of [attribute keys](../common/README.md#attribute)) is
278277
the recommended set of attribute keys to be used for the resulting metrics.
279278

280-
##### Instrument advisory parameter: `ExcludeAttributes`
281-
282-
**Status**: [Development](../document-status.md)
283-
284-
Applies to all instrument types.
285-
286-
`ExcludeAttributes` (a list of [attribute keys](../common/README.md#attribute)) is
287-
the recommended set of attribute keys to not be used for the resulting metrics.
288-
289279
#### Synchronous and Asynchronous instruments
290280

291281
Instruments are categorized on whether they are synchronous or

specification/metrics/sdk.md

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -360,23 +360,31 @@ The SDK MUST accept the following stream configuration parameters:
360360
accept a `description`, but MUST NOT obligate a user to provide one. If the
361361
user does not provide a `description` value, the description from the
362362
Instrument a View matches MUST be used by default.
363-
* `attribute_keys`: This is, at a minimum, an allow-list of attribute keys for
364-
measurements captured in the metric stream. The allow-list contains attribute
363+
* `attribute_keys`: This is, at a minimum, a list of attribute keys for
364+
measurements captured in the metric stream. The list contains attribute
365365
keys that identify the attributes that MUST be kept, and all other attributes
366366
MUST be ignored.
367367

368368
Implementations MAY accept additional attribute filtering functionality for
369369
this parameter.
370370

371+
If a user specifies both `attribute_keys` and either `include_attribute_keys`
372+
or `exclude_attribute_keys`, the SDK MAY fail fast in
373+
accordance with initialization [error handling
374+
principles](../error-handling.md#basic-error-handling-principles).
375+
371376
Users can provide `attribute_keys`, but it is up to their discretion.
372377
Therefore, the stream configuration parameter needs to be structured to
373378
accept `attribute_keys`, but MUST NOT obligate a user to provide them.
379+
374380
If the user does not provide any value, the SDK SHOULD use
375381
the [`Attributes`](./api.md#instrument-advisory-parameters) advisory
376-
parameter configured on the instrument instead. If the `Attributes`
382+
parameter configured on the instrument instead as well as any attributes
383+
specified via `include_attribute_keys`. If the `Attributes`
377384
advisory parameter is absent, all attributes MUST be kept.
378-
379-
* `exlude_attribute_keys`: This is, at a minimum, an exclude-list of attribute keys for
385+
In both cases
386+
attributes specified via `exclude_attribute_keys` should not be kept.
387+
* `exclude_attribute_keys`: This is, an exclude-list of attribute keys for
380388
measurements captured in the metric stream.
381389
The exclude-list contains attribute keys that identify the
382390
attributes that MUST be excluded, all other attributes MUST be kept. If an
@@ -387,11 +395,18 @@ The SDK MUST accept the following stream configuration parameters:
387395
Users can provide `exclude_attribute_keys`, but it is up to their discretion.
388396
Therefore, the stream configuration parameter needs to be structured to
389397
accept `exclude_attribute_keys`, but MUST NOT obligate a user to provide them.
390-
If the user does not provide any value, the SDK SHOULD use
391-
the [`Exclude Attributes`](./api.md#instrument-advisory-parameters) advisory
392-
parameter configured on the instrument instead. If the `Exclude Attributes`
393-
advisory parameter is absent, all attributes MUST be kept.
398+
* `include_attribute_keys`: This is, an include-list of attribute keys for
399+
measurements captured in the metric stream. The include-list contains
400+
attribute keys that identify the attributes that MUST be kept in addition to
401+
the [`Attributes`](./api.md#instrument-advisory-parameters) advisory parameter
402+
configured on the instrument, all other attributes must be excluded. If an
403+
attribute key is both included and excluded, the SDK MAY fail fast in
404+
accordance with initialization [error handling
405+
principles](../error-handling.md#basic-error-handling-principles).
394406

407+
Users can provide `include_attribute_keys`, but it is up to their discretion.
408+
Therefore, the stream configuration parameter needs to be structured to
409+
accept `include_attribute_keys`, but MUST NOT obligate a user to provide them.
395410
* `aggregation`: The name of an [aggregation](#aggregation) function to use in
396411
aggregating the metric stream data.
397412

0 commit comments

Comments
 (0)