1616
1717import * as api from '@opentelemetry/api' ;
1818import {
19- SpanAttributes ,
20- SpanAttributeValue ,
19+ Attributes ,
20+ AttributeValue ,
2121 SpanStatusCode ,
2222 TextMapPropagator ,
2323} from '@opentelemetry/api' ;
@@ -287,7 +287,7 @@ export class SpanShim extends opentracing.Span {
287287 * @param eventName name of the event.
288288 * @param payload an arbitrary object to be attached to the event.
289289 */
290- override logEvent ( eventName : string , payload ?: SpanAttributes ) : void {
290+ override logEvent ( eventName : string , payload ?: Attributes ) : void {
291291 this . _logInternal ( eventName , payload ) ;
292292 }
293293
@@ -297,7 +297,7 @@ export class SpanShim extends opentracing.Span {
297297 * @param keyValuePairs a set of key-value pairs to be used as event attributes
298298 * @param timestamp optional timestamp for the event
299299 */
300- override log ( keyValuePairs : SpanAttributes , timestamp ?: number ) : this {
300+ override log ( keyValuePairs : Attributes , timestamp ?: number ) : this {
301301 const entries = Object . entries ( keyValuePairs ) ;
302302 const eventEntry = entries . find ( ( [ key , _ ] ) => key === 'event' ) ;
303303 const eventName = eventEntry ?. [ 1 ] || 'log' ;
@@ -309,7 +309,7 @@ export class SpanShim extends opentracing.Span {
309309
310310 private _logInternal (
311311 eventName : string ,
312- attributes : SpanAttributes | undefined ,
312+ attributes : Attributes | undefined ,
313313 timestamp ?: number
314314 ) : void {
315315 if ( attributes && eventName === 'error' ) {
@@ -321,7 +321,7 @@ export class SpanShim extends opentracing.Span {
321321 return ;
322322 }
323323
324- const mappedAttributes : api . SpanAttributes = { } ;
324+ const mappedAttributes : api . Attributes = { } ;
325325 for ( const [ k , v ] of entries ) {
326326 switch ( k ) {
327327 case 'error.kind' : {
@@ -352,7 +352,7 @@ export class SpanShim extends opentracing.Span {
352352 * Adds a set of tags to the span.
353353 * @param keyValueMap set of KV pairs representing tags
354354 */
355- override addTags ( keyValueMap : SpanAttributes ) : this {
355+ override addTags ( keyValueMap : Attributes ) : this {
356356 for ( const [ key , value ] of Object . entries ( keyValueMap ) ) {
357357 if ( this . _setErrorAsSpanStatusCode ( key , value ) ) {
358358 continue ;
@@ -370,7 +370,7 @@ export class SpanShim extends opentracing.Span {
370370 * @param key key for the tag
371371 * @param value value for the tag
372372 */
373- override setTag ( key : string , value : SpanAttributeValue ) : this {
373+ override setTag ( key : string , value : AttributeValue ) : this {
374374 if ( this . _setErrorAsSpanStatusCode ( key , value ) ) {
375375 return this ;
376376 }
@@ -398,7 +398,7 @@ export class SpanShim extends opentracing.Span {
398398
399399 private _setErrorAsSpanStatusCode (
400400 key : string ,
401- value : SpanAttributeValue | undefined
401+ value : AttributeValue | undefined
402402 ) : boolean {
403403 if ( key === opentracing . Tags . ERROR ) {
404404 const statusCode = SpanShim . _mapErrorTag ( value ) ;
@@ -409,7 +409,7 @@ export class SpanShim extends opentracing.Span {
409409 }
410410
411411 private static _mapErrorTag (
412- value : SpanAttributeValue | undefined
412+ value : AttributeValue | undefined
413413 ) : SpanStatusCode {
414414 switch ( value ) {
415415 case true :
0 commit comments