提交 e05a402e 编写于 作者: X Xin,Zhang 提交者: wu-sheng

Change rewriteOperationName to ContextManager (#25)

上级 355e42fa
......@@ -148,3 +148,15 @@ ContextManager.prototype.createLocalSpan = function(operationName) {
return span;
};
ContextManager.prototype.rewriteOperationName = function(span, operationName) {
this._dictionaryManager.findOperationName(operationName,
function(key, value) {
if (key == "operationName") {
span._operationName = value;
}
if (key == "operationId") {
span._operationId = value;
}
});
};
......@@ -54,7 +54,3 @@ NoopTraceContext.prototype.extract = function(contextCarrier) {
NoopTraceContext.prototype.traceSegment = function() {
return NOOP_TRACE_SEGMENT;
};
NoopTraceContext.prototype.rewriteOperationName = function() {
};
......@@ -130,15 +130,3 @@ TraceContext.prototype.extract = function(contextCarrier) {
TraceContext.prototype.traceSegment = function() {
return this._traceSegment;
};
TraceContext.prototype.rewriteOperationName = function(operationName) {
this._dictionaryManager.findOperationName(operationName,
function(key, value) {
if (key == "operationName") {
this._span._operationName = value;
}
if (key == "operationId") {
this._span._operationId = value;
}
});
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册