Kong / kong-plugin-zipkin

A Kong plugin for propogating zipkin spans and reporting spans to a zipkin server - this plugin has been moved into https://github.com/Kong/kong, please open issues and PRs in that repo
Apache License 2.0
60 stars 31 forks source link

Global sample ratio overrides route-specific #106

Closed burdikov closed 3 years ago

burdikov commented 3 years ago

Hello, guys,

Title says it all pretty much. Not sure if this issue is with the plugin (since the config is calculated by kong), but other plugins seem to prioritize configuration values correctly.

So, having config like this

_format_version: "2.1"
_transform: true

services:
- name: echo
  url: 'https://httpbin.org'
  routes:
  - name: echo
    paths:
    - /echo
    plugins:
    - name: zipkin
      config:
        "http_endpoint": "http://jaeger-collector:9411/api/v2/spans"
        "sample_ratio": 1

plugins:
- name: zipkin
  config:
    "http_endpoint": "http://jaeger-collector:9411/api/v2/spans"
    "sample_ratio": 0

will leave without any traces from requests to /echo.

kikito commented 3 years ago

Thanks for writing such a detailed issue, we'll try to investigate it as soon as possible.

kikito commented 3 years ago

Hello @burdikov,

I programmed a fix for this problem and just released version 1.4.1 of the plugin with it on it.

burdikov commented 3 years ago

Thanks a lot!