Personal intercepts allow you to be selective and intercept only some of the traffic to a service while not interfering with the rest of the traffic. This allows you to share a cluster with others on your team without interfering with their work.
Personal intercepts are subject to the Ambassador Cloud active service and user limit quotas. To read more about these quotas limits, see the subscription management page.
In the illustration above, Orange requests are being made by Developer 2 on their laptop and the green are made by a teammate, Developer 1, on a different laptop.
Each developer can intercept the Orders service for their requests only, while sharing the rest of the development environment.
Creating the intercept: Intercept your service from your CLI:
Personal-Intercept=126a72c7-be8b-4329-af64-768e207a184bas the header for the sake of the example, but you can use any
key=valuepair you want, or
--http-header=autoto have it choose something automatically.
Using the intercept: Send requests to your service by passing the HTTP header:
Using the intercept: Send requests to your service without the HTTP header:
Requests without the header will be sent to the version of your service that is running in the cluster. This enables you to share the cluster with a team!
It's not uncommon to have one service serving several endpoints. Telepresence is capable of limiting an
intercept to only affect the endpoints you want to work with by using one of the
flags below in addition to using
--http-header flags. Only one such flag can be used in an intercept
and, contrary to the
--http-header flag, it cannot be repeated.
The following flags are available:
|Only intercept the endpoint for this exact path|
|Only intercept endpoints with a matching path prefix|
|Only intercept endpoints that match the given regular expression|
A personal intercept using the header "Coder: Bob" limited to all endpoints that start with "/api':
A personal intercept using the auto generated header that applies only to the endpoint "/api/version":
--http-header=autois the implicit when using
A personal intercept using the auto generated header limited to all endpoints matching the regular expression "(staging-)?api/.*":