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

Migrate UI to use v2 API endpoints #1802

Closed
shakuzen opened this issue Nov 17, 2017 · 7 comments
Closed

Migrate UI to use v2 API endpoints #1802

shakuzen opened this issue Nov 17, 2017 · 7 comments
Labels

Comments

@shakuzen
Copy link
Member

v2 API endpoints are now available for the v2 span format, but the UI still uses the v1 API endpoints, and consequently the v1 span format. It would be good if the UI were v2 native like other components are now.

@apei830
Copy link

apei830 commented Nov 17, 2017

I just looked into the source code, I found that ZipkinQueryApiV2 won't be loaded, and I tried the url in browser http://localhost:9411/zipkin/api/v2/services, got 404 error, so I guess that the v2 UI is not ready yet. :)

@shakuzen
Copy link
Member Author

@apei830 I ran into the same thing, but the V2 API is in fact in place and intentionally not available under /zipkin because that is for the UI. Recent Gitter chat log:

Tommy Ludwig @shakuzen 18:09
I noticed the v2 query endpoints are from the root while v1 are from /zipkin. Concretely, this works:
http://localhost:9411/zipkin/api/v1/trace/c204854ddf6e4a72
this gets a 404:
http://localhost:9411/zipkin/api/v2/trace/c204854ddf6e4a72
this works:
http://localhost:9411/api/v2/trace/c204854ddf6e4a72

Adrian Cole @adriancole 18:10
anything about api being under /zipkin is basically accident of UI mounting

@apei830
Copy link

apei830 commented Nov 17, 2017

Hi shakuzen,

Please refer to the source code of ZipkinUiAutoConfiguration
https://github.com/openzipkin/zipkin/blob/master/zipkin-autoconfigure/ui/src/main/java/zipkin/autoconfigure/ui/ZipkinUiAutoConfiguration.java

/** The UI looks for the api relative to where it is mounted, under /zipkin */
@RequestMapping(value = "/zipkin/api/v1/**", method = GET)
public ModelAndView forwardApi(HttpServletRequest request) {
String path = (String) request.getAttribute(PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
return new ModelAndView("forward:" + path.replaceFirst("/zipkin", ""));
}

it seems that all request under /zipkin/api/vi/** will be forward to the path /api/vi/**

@apei830
Copy link

apei830 commented Nov 17, 2017

@shakuzen
;)

@codefromthecrypt
Copy link
Member

codefromthecrypt commented Nov 18, 2017 via email

codefromthecrypt pushed a commit that referenced this issue Nov 24, 2017
This forwards /api -> /zipkin/api so the UI can start using the v2 api.

See #1802
@codefromthecrypt
Copy link
Member

#1818 forwards the api root

codefromthecrypt pushed a commit that referenced this issue Nov 24, 2017
This forwards /api -> /zipkin/api so the UI can start using the v2 api.

See #1802
@codefromthecrypt
Copy link
Member

added #2217 to actually use v2 data internally now that we are consuming it

abesto pushed a commit to abesto/zipkin that referenced this issue Sep 10, 2019
This forwards /api -> /zipkin/api so the UI can start using the v2 api.

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

No branches or pull requests

3 participants