CloudNativeJS / appmetrics-zipkin

Provide zipkin integration from appmetrics
Other
63 stars 19 forks source link

Can I only add traceId in some of requests endpoint? #42

Open xiaoxi625 opened 6 years ago

xiaoxi625 commented 6 years ago

Is there a way to filter endpoint? Because I don't want to send trace records to my zipkin server for health check endpoint. Currently I added appmetrics-zipkin to my express-js server and I find it adds traceid globally and all of requests records are kept in my zipkin server. However some of them such as health-check endpoint is unnecessary. Is there any method I can filter my health check endpoint?

sjanuary commented 6 years ago

We don't have this feature in appmetrics-zipkin at the moment, but we're open to pull requests if you or anyone else is interested in implementing it. I notice we do it already in appmetrics - see https://github.com/RuntimeTools/appmetrics/blob/master/probes/http-probe.js#L75-L88 and https://github.com/RuntimeTools/appmetrics/blob/7a856a9edc8c4a4d2c07fc949c25a9bb5ab9c3d7/README.md#appmetricssetconfigtype-config. The probes in appmetrics-zipkin were based on the probes in appmetrics so it should be relatively straightforward to port this over.