Instructions on how to enable this plugin
valdezm opened this issue · 5 comments
Issuing the command:
curl -X PUT --url http://localhost:8001/plugins/ -d name=zipkin -d config.http_endpoint=http://127.0.0.1:9411/api/v2/spans
Results in:
'{"config":"plugin 'zipkin' not enabled; add it to the 'custom_plugins' configuration property"}'
I think this means I have to clone this repo, then follow instructions as specified here(since I am running Kong in Docker):
Kong/docker-kong#24
A little frustrated that this plugin is shipped with Kong as there isn't a sliver of mention otherwise found, here:
And here:
2. https://getkong.org/plugins/zipkin/
Seems like if Kong is going to showcase it on their site, it should be part of the core and if not there should be instructions on how to add it to Kong in any of these 3 places, but particularly on the README.MD of this repo?
Am I missing something here? Were these instructions omitted for a purpose?
Instead of complaining, I am happy to help out and create them. I suppose I am just confused rather than frustrated.. Again, feels like I am missing something.
Sorry for the trouble you are having @valdezm - we didn't do a good job of clarifying how to use this plugin - currently, it is available only bundled with Kong Enterprise Edition 0.32 - you'll see a much-too-subtle note on https://getkong.org/plugins/zipkin/ that says:
Note: Zipkin plugin is available in Enterprise as of version 0.32 and will soon be available as part of Kong CE 0.14.
As noted, when CE 0.14 comes out, likely within a few weeks, the Zipkin plugin will be bundled with Kong CE. Until then, you can try the Zipkin plugin as part of EE 0.32 via https://konghq.com/installations/
Normally, we add features to CE first, then incorporate them into EE upon the next EE release. In this case, when we'd finished the first version of the Zipkin plugin, we had an EE release coming out shortly thereafter - and we decided to ship the plugin as part of EE first, then add it to the next CE release, reversing our typical pattern.
Sorry that we didn't make the experience of trying out this plugin good for you - we'll try to do better in the future!
Thanks for your speedy response.
It's fine, I just got confused about whether or not I was suppose to integrate the plugin manually.. The most misleading culprit is that it isn't marked as Enterprise, here: https://konghq.com/plugins/
So I was expecting to be in my CE, given that there aren't any specific instructions on requiring to integrate it manually.
So if I wanted to integrate it manually to my CE, then I would just clone this repo and add it to the plugins folder of Kong, that should be sufficient?
Thanks.
@valdezm Hi,
First and foremost, I should start by saying that unfortunately, this plugin is not compatible with Kong CE 0.13. You would need several commits from this patch set: Kong/kong#3434. At this time, we are planning on releasing 0.14 (with this plugin) by the end of the month, with a release candidate coming up shortly. Otherwise, I would advise you to apply the patches from this PR and build your own image. If you do so, you won't even have to deal with installing this plugin as a custom one.
So if I wanted to integrate it manually to my CE, then I would just clone this repo and add it to the plugins folder of Kong, that should be sufficient?
If you still want to install this plugin as a custom one:
The gist of it is that the plugin should be available to Kong on disk, and added to the custom_plugins
configuration property. You can achieve this via various ways: using Docker volumes, creating your own image, or even with projects or inspiration such as https://github.com/dojot/kong. Don't forget that you can also specify configure Kong with environment variables, so using -e KONG_CUSTOM_PLUGINS=my-custom-plugin
would also work. The plugin also needs to be in the LUA_PATH
(like PATH
, but for Lua modules).
So, in short, one of the possible solutions would be to use volumes and environment variables:
- Mount the plugin's code:
-v /path/to/my-custom-plugin:/etc/kong/plugins/my-custom-plugin
- Add the directory containing custom plugins to the
LUA_PATH
:-e KONG_LUA_PACKAGE_PATH=/etc/?.lua
(Kong requireskong.plugins.custom-plugin.handler
, which translates to/etc/kong/plugins/my-custom-plugin/handler.lua
) - Instruct Kong to load the plugin with:
-e KONG_CUSTOM_PLUGINS=my-custom-plugin
@thibaultcha , We have installed kong ce 0.14 in kubernetes platform and everything is working fine. We just started to plug zipkin with kong. We have one zipkin instance, listening on http://xx.xx.xx.x1:9411. As per documentation (https://docs.konghq.com/plugins/zipkin/?_ga=2.57393453.642346710.1532780932-489005862.1531984052) we have enable zipkin for api (soap-over-http backend application). But we didnt see any metrics exporting to zipkin instance (http://xx.xx.xx.x1:9411). We also checked zipkin logs but no events are received at zipkin end. Could you please suggest how we should integrate with zipkin. Thanks in advance !!
Regards,
Please suggest how we should integrate with zipkin.
@ayan1207 please open a new issue and describe the configuration you are using.
A guess at your issue is you are using the default sample_ratio
of 0.001
. This means that only one out of every 1000 requests will be sent to zipkin.