FrankChen021 / bithon

An observability platform mainly for Java
Apache License 2.0
16 stars 5 forks source link

Add hitcount to agent.instrumented_method #571

Closed FrankChen021 closed 1 year ago

FrankChen021 commented 1 year ago

A follow up of #549 so that we get more insight into the instrumentation for a fresh new application.

  1. define a counter on each interceptor
  2. when returning the data, search the interceptor from InterceptorManager to get the counter
  3. the classLoader is the identity of class loader that loads the interceptor

difficulty existing InterceptorManager keeps interceptor instance and its loader as a key, to find the interceptor instance by name is very slow. Need to optimize the data structure as a nested map.