this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use OTEL transport in XRPC client for PDS

+11 -2
+11 -2
models/models.go
··· 2 2 3 3 import ( 4 4 "database/sql" 5 + "net/http" 5 6 "time" 6 7 8 + "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" 7 9 "gorm.io/gorm" 8 10 9 11 bsky "github.com/bluesky-social/indigo/api/bsky" ··· 122 124 } 123 125 124 126 func ClientForPds(pds *PDS) *xrpc.Client { 127 + c := http.Client{ 128 + Transport: otelhttp.NewTransport(http.DefaultTransport), 129 + Timeout: time.Minute * 5, 130 + } 131 + 125 132 if pds.SSL { 126 133 return &xrpc.Client{ 127 - Host: "https://" + pds.Host, 134 + Client: &c, 135 + Host: "https://" + pds.Host, 128 136 } 129 137 } 130 138 131 139 return &xrpc.Client{ 132 - Host: "http://" + pds.Host, 140 + Client: &c, 141 + Host: "http://" + pds.Host, 133 142 } 134 143 } 135 144