generateMetricPayload(span) {
		let payload = {
			id: span.id,
			requestID: span.traceID,
			level: span.tags.callingLevel,
			startTime: span.startTime,
			remoteCall: span.tags.remoteCall
		};

		// Process extra metrics
		if (span.opts.ctx) this.processExtraMetrics(span.opts.ctx, payload);

		payload.action = span.tags.action;
		payload.service = span.service;

		if (span.parentID) payload.parent = span.parentID;

		payload.nodeID = this.broker.nodeID;
		if (payload.remoteCall) payload.callerNodeID = span.tags.callerNodeID;

		if (span.finishTime) {
			payload.endTime = span.finishTime;
			payload.duration = span.duration;
			payload.fromCache = span.tags.fromCache;

			if (span.error) {
				payload.error = this.errorToObject(span.error);
			}
		}

		return payload;
	}
Generate metrics payload

@param {Context} ctx
@returns {Object}