nginxinc / nginx-otel

Apache License 2.0
168 stars 19 forks source link

otel_span_attr context if #68

Open fede843 opened 1 month ago

fede843 commented 1 month ago

I am trying to convert several headers into attributes. The current approach is to go one by one, by using otel_span_attr otel_span_attr has not if context. I cannot make it conditional. There is no way to keep the span clean, and end up with a bunch of empty attributes. If _otel_spanattr had if context, I could easily go one by one checking if exists. Or maybe there is another idea or proposal to make headers easy to convert other than this.