Tyk Pump is a pluggable analytics purger to move Analytics generated by your Tyk nodes to any back-end.
The table below provides details on the fields within each tyk_analytics record.
| Analytics Data Field | Description | Remarks | Example |
|---|---|---|---|
Method |
Request method | GET, POST |
|
Host |
Request Host header |
Includes host and optional port number of the server to which the request was sent. | tyk.io, or tyk.io:8080 if port is included |
Path |
Request path | Displayed in decoded form. | /foo/bar for /foo%2Fbar or /foo/bar |
RawPath |
Request path | Same value as Path. Does not provide the raw encoded path. |
/foo/bar for /foo%2Fbar or /foo/bar |
ContentLength |
Request Content-Length header |
The number of bytes in the request body. | 10 for request body 0123456789 |
UserAgent |
Request User-Agent header |
curl/7.86.0 |
|
Day |
Request day | Based on TimeStamp field. |
16 for 2022-11-16T03:01:54Z |
Month |
Request month | Based on TimeStamp field. |
11 for 2022-11-16T03:01:54Z |
Year |
Request year | Based on TimeStamp field. |
2022 for 2022-11-16T03:01:54Z |
Hour |
Request hour | Based on TimeStamp field. |
3 for 2022-11-16T03:01:54Z |
ResponseCode |
Response code | Only contains the integer element of the response code. Can be generated by either the gateway or upstream server, depending on how the request is handled. | 200 for 200 OK |
APIKey |
Request authentication key |
Authentication key, as provided in request. If no API key is provided then gateway will substitute a default value. | Unhashed auth_key, hashed 6129dc1e8b64c6b4, or 00000000 if no authentication provided. |
TimeStamp |
Request timestamp | Generated by the gateway, based on the time it receives the request from the client. | 2022-11-16T03:01:54.648+00:00 |
APIVersion |
Version of API Definition requested | Based on version configuration of context API definition. If API is unversioned then value is "Not Versioned". | Could be an alphanumeric value such as 1 or b. Is Not Versioned if not versioned. |
APIName |
Name of API Definition requested | Foo API |
|
APIID |
Id of API Definition requested | 727dad853a8a45f64ab981154d1ffdad |
|
OrgID |
Organisation Id of API Definition requested | 5e9d9544a1dcd60001d0ed20 |
|
OauthID |
Id of OAuth client | Value is empty string if not using OAuth, or OAuth client not present. | my-oauth-client-id |
RequestTime |
Duration of upstream roundtrip | Equal to value of Latency.Total field. |
3 for a 3ms roundtrip |
RawRequest |
Raw HTTP request | Base64 encoded copy of the request sent from the gateway to the upstream server. | R0VUIC9nZXQgSFRUUC8xLjEKSG9zdDogdHlrLmlv |
RawResponse |
Raw HTTP response | Base64 encoded copy of the response sent from the gateway to the client. | SFRUUC8xLjEgMjAwIE9LCkNvbnRlbnQtTGVuZ3RoOiAxOQpEYXRlOiBXZWQsIDE2IE5vdiAyMDIyIDA2OjIxOjE2IEdNVApTZXJ2ZXI6IGd1bmljb3JuLzE5LjkuMAoKewogICJmb28iOiAiYmFyIgp9Cg== |
IPAddress |
Client IP address | Taken from either X-Real-IP or X-Forwarded-For request headers, if set. Otherwise, determined by gateway based on request. |
172.18.0.1 |
Geo |
Client geolocation data | Calculated using MaxMind database, based on client IP address. | {"country":{"isocode":"SG"},"city":{"geonameid":0,"names":{}},"location":{"latitude":0,"longitude":0,"timezone":""}} |
Network |
Network statistics | Not currently used. | N/A |
Latency |
Latency statistics | Contains two fields; upstream is the roundtrip duration between the gateway sending the request to the upstream server and it receiving a response. total is the upstream value plus additional gateway-side functionality such as processing analytics data. |
{"total":3,"upstream":3} |
Tags |
$ claude mcp add tyk-pump \
-- python -m otcore.mcp_server <graph>