I’ve recently setup an API Gateway V2 HTTP Gateway to direct requests that match a HTTP Path to a new microservice, and requests that don’t match will be directed to the old monolithic service. However, I want to be able to see where requests where proxied so e.g
/api/v1/pets → sent to new api
/api/v1/rabbits → sent to old api
This doesn’t seem possible with the variables and I’m wondering if I’m missing something as this seems like a basic function
If I’m reading this correctly you want to log which of the two integrations the request goes to? Could you use $context.path to log the api path and derive it from there?
In my setup there are more than two integrations for different routes, and there is also a route that will catch any request that doesn’t match - So I can’t just say yeah it matched this route I need to be able to at least see what integration it went too, or the host it sent it too.
I don’t normally like to answer questions with “just add another product to the mix”, but in your case XRay might be what you need. XRay enabled on the Gateway and the 2 downstream functions/systems would possibly give you what you need
Yeah - This is what I’ve been thinking X-RAY will add the Amazon Trace Header, but even with the Access Logs and Elastic Load Balancer Access Logs there’s still no way to tell where it was redirected too, only what path it toke if it that makes sense