opentracing-javascript
opentracing-javascript copied to clipboard
Simplify spans with default tags?
Either one of two (backwards non-compatible) changes would make things easier for implementers:
- Have the default
Tracer.startSpanimplementation callSpan.addTagsafter calling theSpanconstructor. - Specify that addTags has no effect if passed a falsy value, and have the default
Span.addTagsimplementation perform this check. Then theSpanconstructor can just callthis.addTags(fields && fields.tags).