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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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