opentracing/opentracing-javascript

Simplify spans with default tags?

robsimmons opened this issue · 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).