-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
enhancementNew feature or improvementNew feature or improvementlinter: newSupport new linterSupport new linterno decisionNo decision to fix or notNo decision to fix or not
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
Metadata
Metadata
Assignees
Labels
enhancementNew feature or improvementNew feature or improvementlinter: newSupport new linterSupport new linterno decisionNo decision to fix or notNo decision to fix or not