Krishna can put a use of TCPMon or tcpdump inside the Kubernetes Pod. Either of these things can be added to the main container, or put in another container in the Pod.
Regards, Mike [email protected] wrote on 08/23/2020 01:06:20 PM: > From: "Tamás Gulácsi" <[email protected]> > To: golang-nuts <[email protected]> > Date: 08/23/2020 01:06 PM > Subject: [EXTERNAL] Re: [go-nuts] Debug http calls made using go http client > Sent by: [email protected] > > You can print every step with net/http/httptrace 's ClientTrace. > [email protected] a következőt írta (2020. augusztus 23., > vasárnap, 15:55:50 UTC+2): > Hello Dimas, > > Thank you for your response. My application is running in a > kubernetes cluster and I will not be able to run TCPMon or TCPDump > separately, as access is restricted. I was looking for something > that can be embedded within the go application. > > Regards, > Krishna > > On Sun, Aug 23, 2020 at 7:13 PM Dimas Prawira <[email protected]> wrote: > There are several tools which you can use to help to inspect, > > 1. TCPmon, is a java-based tool for inspecting http call in between > server and client. TCPmon also can be used to simulate slow connection. > > Work mechanism of TCPmon is as a proxy. So if I describe it as below > > [Your apps] ---> [tcpmon] ---> [server] > > 2. TCPdump, is a linux app which can be use to dump TCP connection > in and out. This can be help to inspect HTTP request / HTTP come to > the server. > > 3. Traceroute > You may want to inspect / trace connection from your server to > vendor's server using traceroute, maybe the problem is in the connection. > > Hope that's helpful > > On Sat, Aug 22, 2020, 01:59 [email protected] <[email protected]> wrote: > Hello Gophers, > > I am making multiple http calls from my go application to an > external vendor's http server using the go standard http client. > I've set a 10 second timeout for my context. Everything works fine. > > However, I get random timeouts in my application due to these HTTP > calls. On further investigation, I found that the http calls to the > vendor's server take longer than 10 seconds. > During this period of timeouts, the vendor says they've not received > any HTTP requests. How do I verify that the http requests are made > from my app? If the requests are made from my app, how can I figure > out what's causing the delay? > > I tried debugging using the HTTP client trace, but couldn't find any > actionable information. Any suggestions on how to debug/fix this issue ? > > Thanks > - Krishna > -- > You received this message because you are subscribed to the Google > Groups "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, > send an email to [email protected]. > To view this discussion on the web visit https://groups.google.com/ > d/msgid/golang-nuts/2d454dda-6670-48ef-85a2-0a42216dcd29n%40googlegroups.com. > -- > You received this message because you are subscribed to the Google > Groups "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, > send an email to [email protected]. > To view this discussion on the web visit https://groups.google.com/ > d/msgid/golang-nuts/72972301-5163-4dfd-8886-1ed2b8efadc4n%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/OFBF44A5F2.6B132B86-ON852585CD.00648478-852585CD.0064AEF2%40notes.na.collabserv.com.
