We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7242c76 commit 75672cbCopy full SHA for 75672cb
packages/opentelemetry-tracing/src/Span.ts
@@ -103,15 +103,10 @@ export class Span implements api.Span, ReadableSpan {
103
104
if (
105
Object.keys(this.attributes).length >=
106
- this._traceParams.numberOfAttributesPerSpan!
+ this._traceParams.numberOfAttributesPerSpan! &&
107
+ !Object.prototype.hasOwnProperty.call(this.attributes, key)
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
- }
+ return this;
115
}
116
this.attributes[key] = value;
117
return this;
0 commit comments