{"repo":"jjti/go-spancheck","free":true,"listed":false,"github":"https://github.com/jjti/go-spancheck","clone":"git clone https://github.com/jjti/go-spancheck.git","description":"checks usage of OpenTelemetry/Census spans","language":"Go","stars":83,"topics":["linting","otel","telemetry","tracing","observability"],"license":"MIT","category":"analytics","readme_excerpt":"go-spancheck Checks usage of: - OpenTelemetry spans from go.opentelemetry.io/otel/trace - OpenCensus spans from go.opencensus.io/trace Example Configuration golangci-lint Docs on configuring the linter are also available at https://golangci-lint.run/usage/linters/#spancheck: CLI To install the linter as a CLI: Only the span.End() check is enabled by default. The others can be enabled with -checks 'end,set-status,record-error' . Ignore Check Signatures This setting avoids false positives from utility functions that return spans (which are handled gracefully by callers of the function). The span.SetStatus() and span.RecordError() checks warn when there is: 1. a path to return statement 1. that returns an error 1. without a call (to SetStatus or RecordError , respectively) But it's convenient to call SetStatus and RecordError from utility methods [1]. To support that, the ignore- -check-signatures settings will suppress warnings if the configured function is present in the path. For example, by default, the code below would have warnings as shown: The warnings are can be ignored by setting -ignore-check-signatures flag to recordErr : Extra Start Span Signatures This setting informs spancheck of additional Span creation functions that should be linted (besides the library defaults). By default, Span creation will be tracked from calls to (go.opentelemetry.io/otel/trace.Tracer).Start, go.opencensus.io/trace.StartSpan, or go.opencensus.io/trace.StartSpanWithRemoteParent. You can us","default_branch":null,"files":null,"tree":[],"storefront":"/r/jjti","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jjti/go-spancheck/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}