Description
Use case
Currently if you add a span to a function with the provided annotation tracer.capture_method
, the created span only uses the function's name. So if it is a function within a class, say for example some implementation of an abstract class, it is hard to realise which particular method was called as there are multiple classes with the same method.
Solution/User Experience
If we include the class in the operation name of the span, I think that would be helpful. I am not really sure if I won't start doscussion on whether the full module name needs included as well, but I think in terms of usefulness, asking for the class name is a sensible middle ground that would cover most people's use cases (hopefully others don't often have the same class name within different modules of the same project)
Alternative solutions
No response
Acknowledgment
- This feature request meets Lambda Powertools Tenets
- Should this be considered in other Lambda Powertools languages? i.e. Java, TypeScript