jersey
  1. jersey
  2. JERSEY-2025

ResourceMethodStatistics does not work correctly for sub resource locators.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None

      Description

      ResourceMethodStatistics are duplicated in MonitoringStatistics with sub resource locators.

      @Path("resource")
          public static class StatisticsTest {
              @Context
              Provider<MonitoringStatistics> statistics;
      
              @GET
              public String get() throws InterruptedException {
                  ....
              }
      
              @Path("resource-locator")
              public SubResource locator() {
                  return new SubResource();
              }
          }
      
          public static class SubResource {
              @GET
              public String get() {
                  return "get";
              }
      
          }
      

      with each request to "resource/resource-locator" new MethodStatistics object will be created in MonitoringStatistics.getResourceClassStatistics().get(SubResource.class).getResourceMethodStatistics(). So, for each request call, new GET method is created in monitoring for SubResource. This is only the problem of sub resource locators.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Miroslav Fuksa
            Reporter:
            Miroslav Fuksa
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 3 hours Original Estimate - 3 hours
              3h
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 4 hours
              4h