analytics_decorator
¶
Standalone analytics decorator for instance methods.
Extracted from metrics.analytics.Analytics.track_instance_method so that
core/ no longer imports the concrete Analytics class at runtime.
The decorator relies on duck typing instead of isinstance
to remain compatible with any object that exposes
execute_async_wrapped_call / execute_sync_wrapped_call.
track_instance_method
¶
Track instance methods by adding analytics tracking.
Requires the decorated class to expose self.analytics (any object
with execute_async_wrapped_call / execute_sync_wrapped_call
methods) and an optional self.error_logger.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
event_type
|
str
|
Category name for the tracked event |
required |