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

ArC - register /quarkus/arc/beans and /quarkus/arc/observers routes in the dev mode #9412

Merged
merged 1 commit into from
May 22, 2020

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented May 18, 2020

  • these routes produce basic debug info in the JSON format

How to use:

  1. mvn quarkus:dev
  2. HTTP GET http://localhost:8080/arc/beans
  3. HTTP GET http://localhost:8080/arc/observers
  4. simple filter Switch to the Maven distributed copy of the SubstrateVM annotations #1 - HTTP GET http://localhost:8080/arc/beans?scope=Singleton
  5. simple filter Make it possible to use docker to build native images #2 -HTTP GET http://localhost:8080/arc/beans?beanClass=org.acme.Foo
  6. simple filter First shot at integrating mp-metrics. #3 - HTTP GET http://localhost:8080/arc/beans?kind=PRODUCER_METHOD

This PR also contains a minimalistic JSON generator (io.quarkus.vertx.http.runtime.devmode.Json, mainly copied from the Weld Probe) because we can't use io.vertx.core.json.JsonObject/JsonArray unless the quarkus-jackson-databind extension is in.

@boring-cyborg boring-cyborg bot added area/arc Issue related to ARC (dependency injection) area/vertx labels May 18, 2020
@mkouba mkouba requested review from geoand and cescoffier May 18, 2020 13:13
@mkouba
Copy link
Contributor Author

mkouba commented May 18, 2020

I should probably add some tests too.

- these routes produce basic debug info in the JSON format
Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very userful feature, 👍

@cescoffier
Copy link
Member

@mkouba Would it make sense to add a link on the generated "index.html" page to get this page?
Maybe also when an error is reported?

@mkouba
Copy link
Contributor Author

mkouba commented May 19, 2020

@cescoffier it's not a page but a JSON file. It would probably make sense to provide an html page as well. That's the next step ;-).

@mkouba mkouba added the triage/waiting-for-ci Ready to merge when CI successfully finishes label May 19, 2020
@cescoffier
Copy link
Member

Yes, definitely a next step. But can be cool to have a few ‘debug’ pages: beans, routes...

@geoand
Copy link
Contributor

geoand commented May 19, 2020

Yes, definitely a next step. But can be cool to have a few ‘debug’ pages: beans, routes...

Absolutely. This stuff then can also be used by IDEs (cc @maxandersen)

@mkouba
Copy link
Contributor Author

mkouba commented May 19, 2020

#2120 is probably related...

@geoand
Copy link
Contributor

geoand commented May 19, 2020

It is yeah :)

@mkouba mkouba merged commit e60c793 into quarkusio:master May 22, 2020
@maxandersen
Copy link
Member

these kind of debug pages - shouldn't we put them under one root, i.e. /devmode/ just to not "overcrowd" the name space ?

@mkouba
Copy link
Contributor Author

mkouba commented May 24, 2020

There is an open issue for mgmt endpoints: #2450

+0 for the /devmode/ suffix...

Also it's not a debug page but a debug endpoint that returns a JSON file ;-).

@maxandersen
Copy link
Member

you are +0 because of the suggested name or in principle ?

and yes #2450 is the same challenge for sure and it doesn't matter if its page or endpoint...its about having things "collected"

@gsmet gsmet added this to the 1.6.0 - master milestone May 26, 2020
@gsmet gsmet changed the title ArC - register /arc/beans and /arc/observers routes in the dev mode ArC - register /quarkus/arc/beans and /quarkus/arc/observers routes in the dev mode Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/arc Issue related to ARC (dependency injection) area/documentation area/vertx release/noteworthy-feature triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants