-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It's great to check for spands that are started and not ended, but I've also seen cases where the span was accidentally ended before it should have been. Specifically this happens when getting the active span from context followed by defere spane.End(). This happens most often when refactoring code and deciding you don't need a new span for a particular function and so change the code starting a new span to get the active span from context in order to add attributes to it. Or you just have engineers adding defer span.End() by reflex after creating or getting the span, so it would be nice to have the linter catch that as well.
I.e. the linter should check for defer span.End() without a preceding new span start.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request