-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Support CORS on Zipkin endpoint #703
Comments
I would guess that the error happens in the web app itself because it's trying to talk to a different address vs where it was loaded from. When you said "this works" did you mean you are able to submit spans to Zipkin backend but not to Jaeger backend? Any chance you can share the code with which we can reproduce? cc @tiffon |
Yes, all of the above is correct. Attached is a small frontend app that demonstrates the issue.
Then browse to http://localhost:8080. The "app" simply says Hello, but if you open the browser dev tools, you will see that it also immediately tries to do a traced call to a backend. I've not included the backend code, but it shouldn't matter. You should still see the CORS issue when trying to call Jaeger. |
Hello. Have you found a workaround for this issue? Thanks |
this seems to indicate that you can change the client submitting spans to not require CORS from the API server. I'll check what we did internally for CORS. |
Any news concerning this issue ? |
I'd say that you should have a reverse proxy in front of the collector for this kind of use case. This reverse proxy should handle authentication, authorization, TLS, CORS and related options. Most OAuth proxy implementations that I know of handle all (or most) of this for you. |
Unfortunately, even with a reverse proxy attempting to set the CORS response headers for I'm deploying to a kubernetes cluster with a traefik reverse proxy, and I have this Ingress defined:
Note: While some of that may appear duplicitous, traefik v1.7.9 is only honoring the custom headers annotations, the others are mostly there as an example of annotations that may accomplish the same task with nginx or other ingress controllers. This traefik does have ACME SSL certs, and is merrily proxying over 50 other services. The dashboard is showing the custom headers are there, and I see them in a developer mode in my browser, so that's all working correctly. The challenge is that I'm getting back:
It appears that the jaeger collector's zipkin implementation doesn't support the I've tried all manner of setting request headers and response headers for CORS, with the same result every time. I am actively looking at how I can redirect just the The primary reason I've ended up trying to use a simple zipkin collector here is that the node.js Any suggestions on how to either instrument jaeger tracing on the browser side from a Vue.js app that is talking to a .NET core backend (not node.js), or get the jaeger collector's zipkin service to respond to an |
It's been a while since I last tried this out, but proxies should handle this case. Typically, if In any case, I wouldn't have anything against accepting a PR that implements a generic jaeger/cmd/query/app/http_handler.go Lines 110 to 120 in 6bbe8dc
|
@mrbeann only Zipkin APi for submitting spans i supported, not for retrieval. |
Hi!
I've instrumented a simple Javascript frontend and a web API backend with Zipkin, and this works. I wanted to use Jaeger as a drop-in replacement for Zipkin on port 9411 by stopping Zipkin and starting Jaeger according to the docs:
However, now I get the following error in my Javascript app:
Here's some more details about the failing request:
I have verified that Jaeger does indeed listen on POST http://localhost:9411/api/v2/spans using Postman.
The text was updated successfully, but these errors were encountered: