Get upstream target url in grpc-go plugin

Hi Team,

I can see outbound upstream target url in debug level logs of tyk gateway. Is there any way to get the same in info level logs?

If not is there any way to do the same using custom middleware (grpc-go in our case) or in any field of the API analytics CSV field of tyk pump.

Thanks!

Hi,

Welcome to the tyk community!

I can see outbound upstream target url in debug level logs of tyk gateway. Is there any way to get the same in info level logs?

No, I’m afraid there isn’t a config option to do this, but the gateway is open source and this is an easy change to make if you were happy to compile your own version.
Simply change Debug to Info in this line

If not is there any way to do the same using custom middleware (grpc-go in our case) or in any field of the API analytics CSV field of tyk pump.

It would be possible in other middleware languages, but grpc-go doesn’t run in or under the tyk process so it can’t write to the tyk logs.

Cheers,
Pete

Thanks for the information,

Which other middleware language can help me to do that?

Also I want to add upstream target_url to the CSV generated in tyk pump. Is it Possible?

Golang directly. No gRPC.

Yes, this is very possible by writing a custom csv pump and compiling your own version of pump. You could input the upstream in the tags section of the analytics record. Just like the gateway, Tyk pump is also open source.