constructor(tracer, name, opts) {
		defProp(this, "tracer", tracer, true);
		defProp(this, "logger", this.tracer.logger, true);
		defProp(this, "opts", opts || {});
		defProp(this, "meta", {});

		this.name = name;
		this.type = this.opts.type || "custom";
		this.id = this.opts.id || this.tracer.broker.generateUid();
		this.traceID = this.opts.traceID || this.id;
		this.parentID = this.opts.parentID;

		if (this.opts.service) {
			if (typeof this.opts.service == "string") {
				this.service = {
					name: this.opts.service,
					fullName: this.opts.service
				};
			} else {
				this.service = {
					name: this.opts.service.name,
					version: this.opts.service.version,
					fullName: this.opts.service.fullName
				};
			}
		}

		this.priority = this.opts.priority != null ? this.opts.priority : 5;
		this.sampled =
			this.opts.sampled != null ? this.opts.sampled : this.tracer.shouldSample(this);

		this.startTime = null;
		this.startTicks = null;
		this.finishTime = null;
		this.duration = null;

		this.error = null;

		this.logs = [];
		this.tags = {};

		if (this.opts.defaultTags) this.addTags(this.opts.defaultTags);

		if (this.opts.tags) this.addTags(this.opts.tags);
	}
Creates an instance of Span.
@param {Tracer} tracer
@param {String} name
@param {Object?} opts

@memberof Span