Skip to content

Commit 75672cb

Browse files
committed
chore: remove ordered attribute dropping
1 parent 7242c76 commit 75672cb

File tree

1 file changed

+3
-8
lines changed
  • packages/opentelemetry-tracing/src

1 file changed

+3
-8
lines changed

packages/opentelemetry-tracing/src/Span.ts

+3-8
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,10 @@ export class Span implements api.Span, ReadableSpan {
103103

104104
if (
105105
Object.keys(this.attributes).length >=
106-
this._traceParams.numberOfAttributesPerSpan!
106+
this._traceParams.numberOfAttributesPerSpan! &&
107+
!Object.prototype.hasOwnProperty.call(this.attributes, key)
107108
) {
108-
const attributeKeyToDelete = Object.keys(this.attributes).shift();
109-
if (attributeKeyToDelete) {
110-
this._logger.warn(
111-
`Dropping extra attributes : ${attributeKeyToDelete}`
112-
);
113-
delete this.attributes[attributeKeyToDelete];
114-
}
109+
return this;
115110
}
116111
this.attributes[key] = value;
117112
return this;

0 commit comments

Comments
 (0)