File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -15,26 +15,10 @@ import (
1515)
1616
1717func newTraceloopExporter (ctx context.Context , config Config ) (* otlp.Exporter , error ) {
18- // WithEndpoint expects host:port format, no protocol or path
19- endpoint := config .BaseURL
20- // Remove protocol if present since WithEndpoint doesn't accept it
21- if strings .HasPrefix (endpoint , "https://" ) {
22- endpoint = strings .TrimPrefix (endpoint , "https://" )
23- }
24- if strings .HasPrefix (endpoint , "http://" ) {
25- endpoint = strings .TrimPrefix (endpoint , "http://" )
26- }
27-
28- // Add default HTTPS port if no port specified
29- if ! strings .Contains (endpoint , ":" ) {
30- endpoint = endpoint + ":443"
31- }
32-
3318 return otlp .New (
3419 ctx ,
3520 otlphttp .NewClient (
36- otlphttp .WithEndpoint (endpoint ),
37- otlphttp .WithURLPath ("/v1/traces" ),
21+ otlphttp .WithEndpoint (config .BaseURL ),
3822 otlphttp .WithHeaders (
3923 map [string ]string {
4024 "Authorization" : fmt .Sprintf ("Bearer %s" , config .APIKey ),
You can’t perform that action at this time.
0 commit comments