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

Add url statistics for vertx #9340

Closed
ga-ram opened this issue Oct 28, 2022 · 1 comment · Fixed by #9342
Closed

Add url statistics for vertx #9340

ga-ram opened this issue Oct 28, 2022 · 1 comment · Fixed by #9342
Assignees
Milestone

Comments

@ga-ram
Copy link
Contributor

ga-ram commented Oct 28, 2022

Currently url statistics can be collected only in spring applications.

ga-ram added a commit to ga-ram/pinpoint that referenced this issue Oct 28, 2022
ga-ram added a commit to ga-ram/pinpoint that referenced this issue Oct 31, 2022
@ga-ram ga-ram linked a pull request Oct 31, 2022 that will close this issue
@ga-ram
Copy link
Contributor Author

ga-ram commented Oct 31, 2022

Above PR enables the agent to collect url statistics for vert.x applications.
Below options are required:

-Dprofiler.uri.stat.enable=true
-Dprofiler.vertx.uri.stat.enable=true

It was impossible to intercept the path of the context handler (as an equivalent of org.springframework.web.servlet.HandlerMapping.bestMatchingPattern in spring web mvc) since vert.x doesn't save it in its request attributes (or in any other variables or contexts), so unfortunately users should add url templates with key pinpoint.statistics.url to each routing context for the agent to know that these urls are using the same handlers.

e.g.)

        router.get("/template/:arg1").handler(routingContext -> {
            routingContext.put("pinpoint.statistics.url", "/template/:arg1");
        });

With above routingContext.put(...), /template/1, /template/asdfadsf, and any other urls usinig that handler will be recorded as /template/:arg1 in url statistics page.
It is also fine if users don't add those codes to their applications that it will not affect any other Pinpoint functionalities. Just that all urls using that handler will be recorded as is in url statistics page.

@ga-ram ga-ram self-assigned this Oct 31, 2022
@ga-ram ga-ram added this to the 2.5.0 milestone Oct 31, 2022
ga-ram added a commit that referenced this issue Nov 1, 2022
BillionaireDY pushed a commit to BillionaireDY/pinpoint that referenced this issue Dec 29, 2022
BillionaireDY pushed a commit to BillionaireDY/pinpoint that referenced this issue Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant