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

chore(otel-resources): replace deprecated spanAttributes #4428

Merged
Show file tree
Hide file tree
Changes from 3 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_NEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### :boom: Breaking Change

* chore(otel-resources): replace deprecated SpanAttributes [#4428](https://github.com/open-telemetry/opentelemetry-js/pull/4428) @JamieDanielson
* chore(otel-core): replace deprecated SpanAttributes [#4408](https://github.com/open-telemetry/opentelemetry-js/pull/4408) @JamieDanielson

### :rocket: (Enhancement)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/opentelemetry-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"access": "public"
},
"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.8.0",
"@opentelemetry/api": ">=1.1.0 <1.8.0",
"@opentelemetry/resources_1.9.0": "npm:@opentelemetry/[email protected]",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry-resources/src/Resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class Resource implements IResource {
merge(other: IResource | null): IResource {
if (!other) return this;

// SpanAttributes from other resource overwrite attributes from this resource.
// Attributes from other resource overwrite attributes from this resource.
const mergedSyncAttributes = {
...this._syncAttributes,
//Support for old resource implementation where _syncAttributes is not defined
Expand Down
6 changes: 2 additions & 4 deletions packages/opentelemetry-resources/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@
*/

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

/**
* 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;
export type ResourceAttributes = Attributes;
JamieDanielson marked this conversation as resolved.
Show resolved Hide resolved

/**
* @deprecated please use {@link DetectorSync}
Expand Down
Loading