Prior to Tyk 5.2, you cannot use OpenTelemetry and so must use OpenTracing with the Jaeger client libraries to send Tyk Gateway traces to Jaeger. For newer versions, note that you should use OpenTelemetry as OpenTracing method is deprecated and would possibly won't be fixed or updated.
Our OpenTracing doc, shows how to implement Jaeger but the tags value are set to null.
The proper way to set this is through tyk.conf like this as it is a key value pair in an array.
{
"tracing": {
"enabled": true,
"name": "jaeger",
"options": {
"baggage_restrictions": null,
"disabled": false,
"headers": null,
"reporter": {
"BufferFlushInterval": "0s",
"collectorEndpoint": "",
"localAgentHostPort": "jaeger:6831",
"logSpans": true,
"password": "",
"queueSize": 0,
"user": ""
},
"rpc_metrics": false,
"sampler": {
"maxOperations": 0,
"param": 1,
"samplingRefreshInterval": "0s",
"samplingServerURL": "",
"type": "const"
},
"serviceName": "tyk-gateway",
"tags": [
{
"key": "environment",
"value": "production"
},
{
"key": "service",
"value": "api-gateway"
},
{
"key": "version",
"value": "v1.0"
}
],
"throttler": null
}
}
}
Note: As of writing, there's a bug with using environment variables as it don't show the tags properly. To make it work, make sure that environment variables for tags are not set and set tags on tyk.conf as shown above.
Comments
0 comments
Article is closed for comments.