refactor: renamed telemetry error to use standard Err prefix
Signed-off-by: William Artero <git@artero.dev>
This commit is contained in:
parent
236666ef71
commit
9ca1161c9b
|
@ -23,7 +23,7 @@ func main() {
|
|||
|
||||
shutdown, err := telemetry.InstrumentAll(ctx, os.Getenv("OTEL_EXPORTER_OTLP_ENDPOINT"))
|
||||
log := telemetry.DefaultLogger()
|
||||
if errors.Is(err, telemetry.NoEndpointError) {
|
||||
if errors.Is(err, telemetry.ErrNoEndpoint) {
|
||||
log.Error(err, "skipping instrumentation")
|
||||
err = nil
|
||||
} else {
|
||||
|
|
|
@ -25,7 +25,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
NoEndpointError = errors.New("OTLP endpoint not provided")
|
||||
ErrNoEndpoint = errors.New("OTLP endpoint not provided")
|
||||
|
||||
otlpConnHandler sync.Once
|
||||
otlpConn *grpc.ClientConn
|
||||
|
@ -191,7 +191,7 @@ func InstrumentLogging(ctx context.Context, otlpEndpoint string) error {
|
|||
|
||||
func InstrumentAll(ctx context.Context, otlpEndpoint string) (func(context.Context), error) {
|
||||
if len(otlpEndpoint) <= 0 {
|
||||
return nil, NoEndpointError
|
||||
return nil, ErrNoEndpoint
|
||||
}
|
||||
|
||||
tracingShutdown, err := InstrumentTracing(ctx, otlpEndpoint)
|
||||
|
|
Loading…
Reference in a new issue