Linter for checking span usage (End, SetStatus, RecordError) #4802
jjti
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
@jjti very cool 🚀 Have you thought about contributing this to |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey! I'm sharing a linter I made for OpenTelemetry spans: https://github.com/jjti/go-spancheck
I've been converted to tracing, and use it religiously, but find it's easy to get spans "wrong":
span.End()
sspan.SetStatus
status:error
despite an error being returnedspan.RecordError()
s that would have made debugging easierThis linter is an attempt to catch those common OTel span gotchus. Feedback welcome!
Beta Was this translation helpful? Give feedback.
All reactions