Class InstrumentedProxy
- All Implemented Interfaces:
InvocationHandler
Two metrics will be recorded for any target: timing and invocations, with an additional tag for "success", having either the value "success" or "failure".
Instrumented methods will be generated at proxy creation time, each associated with a metric name following a pattern of "{namespace}.{method}.{metricName}", where "{metricName}" is either "timing" or "invocations". The namespace is provided at creation time, and is typically unique per target. The "method" is automatically generated, using the method name and parameter count of the method.
Instrumented methods can be customized slightly via the Metered annotation:
- A method can be ignored, causing no metrics to be collected on it. - Provided a custom metric name, in case auto naming produces naming conflicts. - A list of tags added to the metrics.
-
Constructor Summary
ConstructorsConstructorDescriptionInstrumentedProxy(com.netflix.spectator.api.Registry registry, Object target, String metricNamespace) InstrumentedProxy(com.netflix.spectator.api.Registry registry, Object target, String metricNamespace, Map<String, String> tags) -
Method Summary
-
Constructor Details
-
InstrumentedProxy
-
InstrumentedProxy
-
-
Method Details
-
proxy
-
proxy
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-