opentelemetry-cpp-contrib
opentelemetry-cpp-contrib copied to clipboard
Some concerns about nginx module
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

Would giving it an explicit name help here?
E.g.
opentelemetry_operation_name "/api/v1/something/?";
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/?"; ... }
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.