Skip to content

Commit

Permalink
fix(api): deprecate MetricAttributes and MetricAttributeValue (#3406)
Browse files Browse the repository at this point in the history
* docs: fix comment in metrics api refering to span

* fix(api): deprecate MetricsAttributes and MetricAttributeValue

* fix: typo in changelog

Co-authored-by: Daniel Dyla <[email protected]>
  • Loading branch information
Amir Blum and dyladan authored Nov 16, 2022
1 parent bd56547 commit e133f3f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.

## Unreleased

* fix(api): deprecate MetricAttributes and MetricAttributeValue [#3406](https:/open-telemetry/opentelemetry-js/pull/3406) @blumamir
* test(api): disable module concatenation in tree-shaking test [#3409](https:/open-telemetry/opentelemetry-js/pull/3409) @legendecas

## [1.3.0](https://github.com/open-telemetry/opentelemetry-js-api/compare/v1.2.0...v1.3.0)
Expand Down
10 changes: 2 additions & 8 deletions api/src/metrics/Metric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,13 @@ export interface Histogram<AttributesTypes extends MetricAttributes = MetricAttr
record(value: number, attributes?: AttributesTypes, context?: Context): void;
}

// api.SpanAttributes instead of api.Attributes is used here for api package backward compatibility.
/**
* Attributes is a map from string to attribute values.
*
* Note: only the own enumerable keys are counted as valid attribute keys.
* @deprecated please use {@link Attributes}
*/
export type MetricAttributes = Attributes;

// api.SpanAttributeValue instead of api.AttributeValue is used here for api package backward compatibility.
/**
* Attribute values may be any non-nullish primitive value except an object.
*
* null or undefined attribute values are invalid and will result in undefined behavior.
* @deprecated please use {@link AttributeValue}
*/
export type MetricAttributeValue = AttributeValue;

Expand Down

0 comments on commit e133f3f

Please sign in to comment.