7
7
"log"
8
8
"net/http"
9
9
"os"
10
+ "strings"
10
11
"sync"
11
12
"time"
12
13
@@ -68,7 +69,9 @@ func (instance *Traceloop) initialize(ctx context.Context) error {
68
69
69
70
log .Printf ("Traceloop %s SDK initialized. Connecting to %s\n " , Version (), instance .config .BaseURL )
70
71
71
- instance .pollPrompts ()
72
+ if strings .HasSuffix (strings .ToLower (instance .config .BaseURL ), "traceloop.com" ) {
73
+ instance .pollPrompts ()
74
+ }
72
75
err := instance .initTracer (ctx , instance .config .ServiceName )
73
76
if err != nil {
74
77
return err
@@ -91,7 +94,6 @@ func setMessagesAttribute(span apitrace.Span, prefix string, messages []Message)
91
94
}
92
95
}
93
96
94
-
95
97
// Tool calling attribute helpers for new types
96
98
func setToolCallsAttribute (span apitrace.Span , messagePrefix string , toolCalls []ToolCall ) {
97
99
for i , toolCall := range toolCalls {
@@ -105,8 +107,6 @@ func setToolCallsAttribute(span apitrace.Span, messagePrefix string, toolCalls [
105
107
}
106
108
}
107
109
108
-
109
-
110
110
func setToolsAttribute (span apitrace.Span , tools []Tool ) {
111
111
if len (tools ) == 0 {
112
112
return
@@ -132,7 +132,6 @@ func setToolsAttribute(span apitrace.Span, tools []Tool) {
132
132
}
133
133
}
134
134
135
-
136
135
func (instance * Traceloop ) tracerName () string {
137
136
if instance .config .TracerName != "" {
138
137
return instance .config .TracerName
@@ -185,7 +184,6 @@ func (llmSpan *LLMSpan) LogCompletion(ctx context.Context, completion Completion
185
184
return nil
186
185
}
187
186
188
-
189
187
func (instance * Traceloop ) Shutdown (ctx context.Context ) {
190
188
if instance .tracerProvider != nil {
191
189
instance .tracerProvider .Shutdown (ctx )
0 commit comments