Skip to content

Commit 86392ac

Browse files
authored
Merge branch 'next' into feat/remove-addmetricreader
2 parents 686331c + 7f613e0 commit 86392ac

File tree

5 files changed

+15
-32
lines changed

5 files changed

+15
-32
lines changed

CHANGELOG_NEXT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### :boom: Breaking Change
44

5+
* chore(otel-core): replace deprecated SpanAttributes [#4408](https://github.com/open-telemetry/opentelemetry-js/pull/4408) @JamieDanielson
56
* feat(sdk-metrics)!: remove MeterProvider.addMetricReader() in favor of constructor option [#4419](https://github.com/open-telemetry/opentelemetry-js/pull/4419) @pichlermarc
67

78
### :rocket: (Enhancement)

package-lock.json

Lines changed: 6 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/opentelemetry-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"access": "public"
6565
},
6666
"devDependencies": {
67-
"@opentelemetry/api": ">=1.0.0 <1.8.0",
67+
"@opentelemetry/api": ">=1.1.0 <1.8.0",
6868
"@types/mocha": "10.0.6",
6969
"@types/node": "18.6.5",
7070
"@types/sinon": "10.0.20",
@@ -88,7 +88,7 @@
8888
"webpack": "4.46.0"
8989
},
9090
"peerDependencies": {
91-
"@opentelemetry/api": ">=1.0.0 <1.8.0"
91+
"@opentelemetry/api": ">=1.1.0 <1.8.0"
9292
},
9393
"dependencies": {
9494
"@opentelemetry/semantic-conventions": "1.18.1"

packages/opentelemetry-core/src/common/attributes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { diag, SpanAttributeValue, SpanAttributes } from '@opentelemetry/api';
17+
import { diag, AttributeValue, Attributes } from '@opentelemetry/api';
1818

19-
export function sanitizeAttributes(attributes: unknown): SpanAttributes {
20-
const out: SpanAttributes = {};
19+
export function sanitizeAttributes(attributes: unknown): Attributes {
20+
const out: Attributes = {};
2121

2222
if (typeof attributes !== 'object' || attributes == null) {
2323
return out;
@@ -46,7 +46,7 @@ export function isAttributeKey(key: unknown): key is string {
4646
return typeof key === 'string' && key.length > 0;
4747
}
4848

49-
export function isAttributeValue(val: unknown): val is SpanAttributeValue {
49+
export function isAttributeValue(val: unknown): val is AttributeValue {
5050
if (val == null) {
5151
return true;
5252
}

packages/opentelemetry-core/src/trace/sampler/ParentBasedSampler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
Link,
2121
Sampler,
2222
SamplingResult,
23-
SpanAttributes,
23+
Attributes,
2424
SpanKind,
2525
TraceFlags,
2626
trace,
@@ -66,7 +66,7 @@ export class ParentBasedSampler implements Sampler {
6666
traceId: string,
6767
spanName: string,
6868
spanKind: SpanKind,
69-
attributes: SpanAttributes,
69+
attributes: Attributes,
7070
links: Link[]
7171
): SamplingResult {
7272
const parentContext = trace.getSpanContext(context);

0 commit comments

Comments
 (0)