Package com.tnsai.annotations
Annotation Interface Metered
Collects latency, call count, and error rate metrics for a method.
Usage
@Metered
public String chat(String message) { }
@Metered(name = "tool.execution", tags = {"module=core"})
public Object executeTool(String name) { }
- Since:
- 0.3.0
- See Also:
-
Optional Element Summary
Optional Elements
-
Element Details
-
name
String nameCustom metric name. Defaults to class.method if empty.- Returns:
- metric name
- Default:
""
-
tags
String[] tagsStatic tags added to every metric emission (key=value format).- Returns:
- metric tags
- Default:
{}
-
histogram
boolean histogramWhether to record a latency histogram in addition to counters.- Returns:
- true to record histogram (default: true)
- Default:
true
-