Skip to content

Commit 620830d

Browse files
authored
Merge pull request #40 from satisfactorymodding/staging
chore: disable tracing
2 parents f9b7136 + 2fdb734 commit 620830d

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

gql/gql_utils.go

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ package gql
22

33
import (
44
"context"
5-
"fmt"
65
"net"
76
"net/http"
87
"strings"
98
"time"
109

11-
"go.opentelemetry.io/otel"
12-
"go.opentelemetry.io/otel/attribute"
1310
"go.opentelemetry.io/otel/trace"
1411

1512
"github.com/satisfactorymodding/smr-api/db/postgres"
@@ -30,22 +27,22 @@ func WrapMutationTrace(ctx context.Context, action string) (TraceWrapper, contex
3027
}
3128

3229
func wrapTrace(ctx context.Context, action string, actionType string) (TraceWrapper, context.Context) {
33-
spanCtx, span := otel.Tracer("gql").Start(ctx, "GraphQL "+action, trace.WithAttributes(
34-
attribute.String("action_type", "API.graphql."+actionType),
35-
))
30+
//spanCtx, span := otel.Tracer("gql").Start(ctx, "GraphQL "+action, trace.WithAttributes(
31+
// attribute.String("action_type", "API.graphql."+actionType),
32+
//))
3633

3734
return TraceWrapper{
38-
Span: span,
39-
}, spanCtx
35+
//Span: span,
36+
}, ctx
4037
}
4138

4239
func (wrapper TraceWrapper) end() {
43-
defer wrapper.Span.End()
44-
45-
if err := recover(); err != nil {
46-
wrapper.Span.RecordError(fmt.Errorf("panic: %v", err))
47-
panic(err)
48-
}
40+
//defer wrapper.Span.End()
41+
//
42+
//if err := recover(); err != nil {
43+
// wrapper.Span.RecordError(fmt.Errorf("panic: %v", err))
44+
// panic(err)
45+
//}
4946
}
5047

5148
// SetStringINNOE sets target if value not nil or empty

0 commit comments

Comments
 (0)