Skip to content
Draft
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
10 changes: 10 additions & 0 deletions internal/oc/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ var _ trace.Exporter = &LogrusExporter{}
// `s.Status.Code != 0` in which case it will be written at `logrus.ErrorLevel`
// providing `s.Status.Message` as the error value.
func (le *LogrusExporter) ExportSpan(s *trace.SpanData) {
// Currently certain spans could flood logs like stats call:
// There are two stats spans generated for every call - one by
// the interceptor call and second by the service.Stats()
// call itself. We can start by not logging the interceptor
// span as it doesn't have any additional information.
switch s.Name {
case "containerd.task.v2.Task.Stats":
return
}

if s.DroppedAnnotationCount > 0 {
logrus.WithFields(logrus.Fields{
"name": s.Name,
Expand Down
1 change: 0 additions & 1 deletion pkg/octtrpc/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ func ServerInterceptor(opts ...Option) ttrpc.UnaryServerInterceptor {
}
return func(ctx context.Context, unmarshal ttrpc.Unmarshaler, info *ttrpc.UnaryServerInfo, method ttrpc.Method) (_ interface{}, err error) {
name := convertMethodName(info.FullMethod)

var span *trace.Span
opts := []trace.StartOption{trace.WithSampler(o.sampler), oc.WithServerSpanKind}
parent, ok := getParentSpanFromContext(ctx)
Expand Down
Loading