synthetic-monitoring-agent icon indicating copy to clipboard operation
synthetic-monitoring-agent copied to clipboard

Add additional information to HTTP checks to make it easier to track (k6 based checks)

Open mem opened this issue 3 years ago • 5 comments

Currently we add a custom User-Agent header to make it easier for people on the receiving end of these checks to identify the source as Synthetic Monitoring.

To better handle abuse requests, we should add more information (possibly in the form of headers) to the request so that it's simpler and faster to track the issue down to specific users, e.g.

X-SM-Check-Id: 123 X-SM-Tenant-Id: 1000 (this is redundant) X-SM-Region: prod-us-central-0

we need to balance this against adding too much information (increasing the payload), so maybe:

X-SM-Id: prod-us-central-0/1000/123

mem avatar Aug 01 '22 20:08 mem

I think adding a unique checkID, that includes a number for the probe ID (not a string) , shoudl be sufficiant. X-SM-Id: nnnnnnnn-xxx were nnnnnnnn is the checId, and xxx is the probe ID.

There should be an (internal only) API where the checkID can be translated into the tennant/customer details.

simonc6372 avatar Aug 02 '22 10:08 simonc6372

This needs to include the region ID (or use the "global" check ID).

And I think Simon is right, the global check ID (which allows us to identify the API instance) + the probe ID should be more than enough.

mem avatar Jan 31 '24 23:01 mem

We would also need to consider this for k6-backed checks

peterschretlen avatar Jun 13 '24 15:06 peterschretlen