Package com.tnsai.annotations
Annotation Interface Traced
Adds trace ID propagation and structured logging to a method.
Usage
@Traced
public String chat(String message) { }
@Traced(operationName = "tool-execution", includeArgs = true)
public Object executeTool(String name, Map<String, Object> params) { }
- Since:
- 0.3.0
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanWhether to include method arguments in the trace span attributes.booleanWhether to include the return value in the trace span.Custom operation name for the trace span.
-
Element Details
-
operationName
String operationNameCustom operation name for the trace span. Defaults to class.method if empty.- Returns:
- operation name
- Default:
""
-
includeArgs
boolean includeArgsWhether to include method arguments in the trace span attributes.- Returns:
- true to log args (default: false)
- Default:
false
-
includeResult
boolean includeResultWhether to include the return value in the trace span.- Returns:
- true to log result (default: false)
- Default:
false
-