Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edgemicro tracing issue #147

Open
ctcxiao opened this issue Dec 20, 2019 · 0 comments
Open

edgemicro tracing issue #147

ctcxiao opened this issue Dec 20, 2019 · 0 comments

Comments

@ctcxiao
Copy link

ctcxiao commented Dec 20, 2019

Hi there,I found an issue when using edgemicro tracing function. I have one project with opentracing call edgemicro and edgemicro forward to my backend server.

the call chain is like this:

projectA with opentracing -> edgemciro -> projectB with opentracing

I use jaeger backend,but in fact, edgemicro not send its trace information to my jaeger backend.
And my edgemicro start command is as below:

EDGEMICRO_OPENTRACE=true EDGEMICRO_TRACE_MODULE=path/to/tracer edgemicro start -o internal -e development -k xxxx -s xxx

and my tracer core code is as below, I use jaeger client in initTracer function:

module.exports = {
	 initTracerMod: function(name) {
	 	const tracer = initTracer(config, options)
		return tracer;
	}
}

I this it's ok, but edgemicro trace function not works well.so I try to find root cause in source code.At last I found an issue in source code at this file https://github.com/apigee/microgateway-core/blob/master/lib/trace-helper.js

at line 32:

 `requestspan = proxyTrace.extract(FORMAT_HTTP_HEADERS, req.headers);`

proxyTrace.extract function need to return an spanContext, not a span.and at line 37-39, use it to set tag

 requestspan.setTag(Tags.HTTP_URL, req.url);
 requestspan.setTag(Tags.HTTP_METHOD, req.method);

here will occur setTag is not a function error, but in source code it catch the err but do nothing, so the error will gone.the trace information will not be sent as well.

That's all about edgemicro tracing issue.Hope it will be fixed as soon.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant