Skip to content

Commit 75f69e2

Browse files
committed
fix: disable sync if not using traceloop
1 parent e776972 commit 75f69e2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

traceloop-sdk/sdk.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"log"
88
"net/http"
99
"os"
10+
"strings"
1011
"sync"
1112
"time"
1213

@@ -68,7 +69,11 @@ func (instance *Traceloop) initialize(ctx context.Context) error {
6869

6970
log.Printf("Traceloop %s SDK initialized. Connecting to %s\n", Version(), instance.config.BaseURL)
7071

71-
instance.pollPrompts()
72+
if strings.HasSuffix(instance.config.BaseURL, "traceloop.com") {
73+
instance.pollPrompts()
74+
} else {
75+
log.Printf("Traceloop sync disabled: base URL %s does not end with traceloop.com\n", instance.config.BaseURL)
76+
}
7277
err := instance.initTracer(ctx, instance.config.ServiceName)
7378
if err != nil {
7479
return err

0 commit comments

Comments
 (0)