Skip to content

Commit

Permalink
fix(resources): extend ResourceAttributes interface to comply with sp…
Browse files Browse the repository at this point in the history
…ec (#2924)

Co-authored-by: Valentin Marchaud <[email protected]>
  • Loading branch information
blumamir and vmarchaud authored Apr 30, 2022
1 parent 6436d85 commit dc44b86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ All notable changes to this project will be documented in this file.
* fix: sanitize attributes inputs [#2881](https://github.com/open-telemetry/opentelemetry-js/pull/2881) @legendecas
* fix: support earlier API versions [#2892](https://github.com/open-telemetry/opentelemetry-js/pull/2892) @dyladan
* fix: support extract one digit '0' in jaeger traceFlag [#2905](https://github.com/open-telemetry/opentelemetry-js/issues/2905) @shmilyoo
* fix(resources): extend ResourceAttributes interface to comply with spec [#2924](https://github.com/open-telemetry/opentelemetry-js/pull/2924) @blumamir

### :books: (Refine Doc)

Expand Down
11 changes: 7 additions & 4 deletions packages/opentelemetry-resources/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@

import { Resource } from './Resource';
import { ResourceDetectionConfig } from './config';
import { SpanAttributes } from '@opentelemetry/api';

/** Interface for Resource attributes */
export interface ResourceAttributes {
[key: string]: number | string | boolean;
}
/**
* Interface for Resource attributes.
* General `Attributes` interface is added in api v1.1.0.
* To backward support older api (1.0.x), the deprecated `SpanAttributes` is used here.
*/
export type ResourceAttributes = SpanAttributes;

/**
* Interface for a Resource Detector. In order to detect resources in parallel
Expand Down

0 comments on commit dc44b86

Please sign in to comment.