Skip to content

Incorrect string formatting in opencensus bridge #8423

@dashpole

Description

@dashpole

The bridge/opencensus package contains go vet formatting errors where the %q verb is incorrectly used with integer arguments. Specifically, in bridge/opencensus/internal/ocmetric/metric.go, %q is used for the int64 bucket count at

err = errors.Join(err, fmt.Errorf("%w: %q", errNegativeBucketCount, bucket.Count))
and for int slice lengths at . These should be updated to %d (or %v) to resolve the diagnostics.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions