@@ -828,7 +828,10 @@ func (container *Container) WebhookService() (service *services.WebhookService)
828828 return services .NewWebhookService (
829829 container .Logger (),
830830 container .Tracer (),
831- container .HTTPClient ("webhook" ),
831+ & http.Client {
832+ Timeout : 6 * time .Second ,
833+ Transport : container .HTTPRoundTripperWithoutRetry ("webhook" ),
834+ },
832835 container .WebhookRepository (),
833836 container .EventDispatcher (),
834837 )
@@ -865,6 +868,16 @@ func (container *Container) HTTPRoundTripper(name string) http.RoundTripper {
865868 )
866869}
867870
871+ // HTTPRoundTripperWithoutRetry creates an open telemetry http.RoundTripper without retry
872+ func (container * Container ) HTTPRoundTripperWithoutRetry (name string ) http.RoundTripper {
873+ container .logger .Debug (fmt .Sprintf ("Debug: initializing %s %T" , name , http .DefaultTransport ))
874+ return otelroundtripper .New (
875+ otelroundtripper .WithName (name ),
876+ otelroundtripper .WithMeter (otel .GetMeterProvider ().Meter (container .projectID )),
877+ otelroundtripper .WithAttributes (container .OtelResources (container .version , container .projectID ).Attributes ()... ),
878+ )
879+ }
880+
868881// OtelResources generates default open telemetry resources
869882func (container * Container ) OtelResources (version string , namespace string ) * resource.Resource {
870883 return resource .NewWithAttributes (
0 commit comments