@@ -41,7 +41,7 @@ export interface SpanContext {
4141 /**
4242 * Tags of the Span.
4343 */
44- tags ?: { [ key : string ] : string } ;
44+ tags ?: { [ key : string ] : string | number | boolean | undefined } ;
4545
4646 /**
4747 * Data of the Span.
@@ -79,7 +79,7 @@ export interface Span extends SpanContext {
7979 /**
8080 * @inheritDoc
8181 */
82- tags : { [ key : string ] : string } ;
82+ tags : { [ key : string ] : string | number | boolean | undefined } ;
8383
8484 /**
8585 * @inheritDoc
@@ -98,11 +98,14 @@ export interface Span extends SpanContext {
9898 finish ( endTimestamp ?: number ) : void ;
9999
100100 /**
101- * Sets the tag attribute on the current span
101+ * Sets the tag attribute on the current span.
102+ *
103+ * Can also be used to unset a tag, by passing `undefined`.
104+ *
102105 * @param key Tag key
103106 * @param value Tag value
104107 */
105- setTag ( key : string , value : string ) : this;
108+ setTag ( key : string , value : string | number | boolean | undefined ) : this;
106109
107110 /**
108111 * Sets the data attribute on the current span
@@ -156,7 +159,7 @@ export interface Span extends SpanContext {
156159 parent_span_id ?: string ;
157160 span_id : string ;
158161 status ?: string ;
159- tags ?: { [ key : string ] : string } ;
162+ tags ?: { [ key : string ] : string | number | boolean | undefined } ;
160163 trace_id : string ;
161164 } ;
162165 /** Convert the object to JSON */
@@ -168,7 +171,7 @@ export interface Span extends SpanContext {
168171 span_id : string ;
169172 start_timestamp : number ;
170173 status ?: string ;
171- tags ?: { [ key : string ] : string } ;
174+ tags ?: { [ key : string ] : string | number | boolean | undefined } ;
172175 timestamp ?: number ;
173176 trace_id : string ;
174177 } ;
0 commit comments