Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ We use the following categories for changes:
### Changed
- Log throughput in the same line for samples, spans and metric metadata [#1643]
- The `chunks_created` metrics was removed. [#1634]
- Stop logging as an error grpc NotFound and Canceled status codes [#1645]

### Fixed
- Do not collect telemetry if `timescaledb.telemetry_level=off` [#1612]
Expand Down
8 changes: 7 additions & 1 deletion pkg/jaeger/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"context"
"time"

"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"

"github.com/jaegertracing/jaeger/model"
Expand Down Expand Up @@ -76,9 +77,14 @@ func (p *Store) GetTrace(ctx context.Context, traceID model.TraceID) (*model.Tra
metrics.QueryDuration.With(prometheus.Labels{"type": "trace", "handler": "Get_Trace", "code": code}).Observe(time.Since(start).Seconds())
}()
res, err := getTrace(ctx, p.builder, p.conn, traceID)

if err != nil {
return nil, logError(err)
if !errors.Is(err, spanstore.ErrTraceNotFound) {
err = logError(err)
}
return nil, err
}

code = "2xx"
traceRequestsExec.Add(1)
return res, nil
Expand Down
13 changes: 11 additions & 2 deletions pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ import (
"go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp"
"go.opentelemetry.io/otel"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/status"

"github.com/google/uuid"
grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
Expand Down Expand Up @@ -67,9 +69,16 @@ func loggingUnaryInterceptor(ctx context.Context, req interface{}, info *grpc.Un

func loggingStreamInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
err := handler(srv, ss)
if err != nil && !errors.Is(err, context.Canceled) {
log.Error("msg", "error in GRPC call", "err", err)
if err == nil {
return nil
}

st, ok := status.FromError(err)
if ok && (st.Code() == codes.NotFound || st.Code() == codes.Canceled) {
return err
}

log.Error("msg", "error in GRPC call", "err", err)
return err
}

Expand Down