Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(resources): extend ResourceAttributes interface to comply with spec #2924

Merged
merged 5 commits into from
Apr 30, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
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