openzipkin / zipkin-ruby

zipkin-tracer ruby gem
Apache License 2.0
99 stars 40 forks source link

protect against double inserting middlewares #162

Closed jcarres-mdsol closed 2 years ago

jcarres-mdsol commented 5 years ago

It seems that mistake do happen and does not look nice. Thoughts on the approach? I could not find a way to find out at initialization time.

@ykitamura-mdsol @jfeltesse-mdsol

ykitamura-mdsol commented 5 years ago

Why not just fix the mistake?

jfeltesse-mdsol commented 5 years ago

is this to prevent end users from shooting themselves in the foot by adding the middleware twice in their chain?

jcarres-mdsol commented 5 years ago

Right, is to prevent users from adding it twice. I've seen this happen in one instance, could fix it in the project which did it instead and there is an argument for doing that instead. But on the other hand do not want to play a whac-a-mole game. What do you think?