Decorators
Seemingly magic tools that can be added to functions and classes for easier instrumenting
Decorators work by wrapping functions or classes that they are placed above. You’ve probably seen this before. Using decorators allows us to add a lot of functionality to your code with minimal work on your part.
python
@track_agent()
If your implementation uses Classes to denote Agents, this decorator enables automatic agent tracking.
Learn more about tracking agents here.
@track_function()
Sometimes your agent system will use functions that important to track as Actions
.
Adding this decorator above any function will allow every instance of that function call to be tracked and displayed in your Session Drill-Down on the dashboard.