Closed piyushkumar13 closed 6 years ago
We cannot use URL as operation name due to high cardinality. For example requests for the same operation might have two different URLs e.g. wildcard mapping.
@pavolloffay Agreed. But you can use combination of both HTTPMethod and RequestURL.
Ex - GET<space>http://localhost:9999/hello
. It will be more distinguishing instead of just using HTTPMethod.
https://github.com/opentracing-contrib/java-web-servlet-filter/blob/87314176e9e9bd828390bc285f68ad3686f509e7/opentracing-web-servlet-filter/src/main/java/io/opentracing/contrib/web/servlet/filter/TracingFilter.java#L162
Giving name to spans based on the HTTP Method does not look intuitive on the tracers UI(Jaeger, Lightstep, Zipkin etc). For example there can be several PUT requests and the span will look in the UI with name "PUT" in the tracer. A viewer cannot figure out that PUT request is related with which URL(or which service) until he click on the span and checks the tags. Here is the view from Lightstep (Note : regdiscovery-tracer is the name of the tracer)
I think it will good to use request URL instead of HTTP Method so that viewer at the first view on the tracer UI can figure out the particular span is meant for which http request.