Closed
Description
Your feature request related to a problem? Please describe.
The go-opentelemetry-lint
linter helps with properly using the OpenTelemetry SDK for Go.
// bad
func Query(ctx context.Context, db *sql.DB) error {
row := db.QueryRowContext(ctx, `SELECT * FROM sample_text`)
return row.Err()
}
// good
func Query(ctx context.Context, db *sql.DB) error {
ctx, span := tracer().Start(ctx, "query")
defer span.End()
row := db.QueryRowContext(ctx, `SELECT * FROM sample_text`)
return row.Err()
}
https://github.com/polyfloyd/go-opentelemetry-lint
Describe the solution you'd like.
—
Describe alternatives you've considered.
—
Additional context.
No response