opentracing-javascript icon indicating copy to clipboard operation
opentracing-javascript copied to clipboard

Simplify spans with default tags?

Open robsimmons opened this issue 8 years ago • 0 comments

Either one of two (backwards non-compatible) changes would make things easier for implementers:

  • Have the default Tracer.startSpan implementation call Span.addTags after calling the Span constructor.
  • Specify that addTags has no effect if passed a falsy value, and have the default Span.addTags implementation perform this check. Then the Span constructor can just call this.addTags(fields && fields.tags).

robsimmons avatar Mar 17 '17 12:03 robsimmons