TYK - SPLUNK API Traffic Hostname Felds


We transfer traffic logs of APIs to Splunk.

We need to see which Tyk-Gateway each traffic packet passes through.

For this reason, we manually write server information with “tags” in each API definition.

Is there a constant variable containing server information that we can add to the API definition?

Have another suggestion?


No, as far as I know.

You can use API sharding if you have the dashboard. If not, then

  1. using key value secrets with transform headers middleware and custom analytics tags using http headers or
  2. using plugins (either analytics or request) would be the alternative option. You could either hard code it within the plugin or retrieve the value from environment variables. All plugin languages that runs in the gateway process apart from JavaScript should support this.