opentelemetry-cpp-contrib icon indicating copy to clipboard operation
opentelemetry-cpp-contrib copied to clipboard

Some concerns about nginx module

Open anoyli opened this issue 4 years ago • 3 comments

Hi Team, for the nginx instrumentation, i met some problems recently. for my nginx.conf config:

location / {
        opentelemetry_operation_name $uri;
        opentelemetry_propagate;

       ……

because my app has some urls which contains regex: such as /a/b/{c:[0-9]+}, so i found in my jaeger UI, there are so many operations which may exceed the threshold. So I wonder whether any good suggestions for location aggregation? And do i need to add each location which contains regex? o(╥﹏╥)o

Jaeger_UI

anoyli avatar Jun 30 '21 03:06 anoyli

Would giving it an explicit name help here?

E.g. opentelemetry_operation_name "/api/v1/something/?";

seemk avatar Jul 13 '21 20:07 seemk

Would giving it an explicit name help here?

E.g. opentelemetry_operation_name "/api/v1/something/?";

@seemk Thanks for your reply, so for this problem, what we need to do is to write all the regex expressions manually? such as { opentelemetry_operation_name "/api/v1/something/?"; ... }, { opentelemetry_operation_name "/api/v1/something1/?"; ... }, { opentelemetry_operation_name "/api/v1/something2/?"; ... }, { opentelemetry_operation_name "/api/v1/something3/?"; ... }

anoyli avatar Aug 04 '21 06:08 anoyli

I guess having the regex in the URL would be the way to go here then? So instead of the full URL the operation name will be based on the nginx route name.

I'll be back in a couple of days, will take a look how it can be achieved then.

seemk avatar Aug 04 '21 06:08 seemk