@@ -158,42 +158,42 @@ processors:
158158 - context : span
159159 statements :
160160 # Sanitize spans to prevent span metrics cardinality explosion
161- # caused by non-compliant high cardinality span names:
161+ # caused by non-compliant high cardinality span names:
162162 # 1. Define missing http.route on key HTTP operations for meaningful operation names
163163 # 2. Then normalize span names; http server spans lacking http.route default to operations "GET", "POST", etc.
164164
165165 # FRONTEND SERVICE
166166
167167 # Workaround for Next.js high cardinality span name issue: https://github.com/vercel/next.js/issues/54694
168- - set(span.attributes["http.route"], "/api/cart") where
168+ - set(span.attributes["http.route"], "/api/cart") where
169169 span.kind == SPAN_KIND_SERVER and
170170 resource.attributes["service.name"] == "frontend" and
171171 span.attributes["http.route"] == nil and
172- IsMatch(span.attributes["http.target"], "\\/api\\/cart") # e.g. # /api/cart
172+ IsMatch(span.attributes["http.target"], "\\/api\\/cart") # e.g. # /api/cart
173173
174- - set(span.attributes["http.route"], "/api/checkout") where
174+ - set(span.attributes["http.route"], "/api/checkout") where
175175 span.kind == SPAN_KIND_SERVER and
176176 resource.attributes["service.name"] == "frontend" and
177177 span.attributes["http.route"] == nil and
178- IsMatch(span.attributes["http.target"], "\\/api\\/checkout") # e.g. # /api/checkout
178+ IsMatch(span.attributes["http.target"], "\\/api\\/checkout") # e.g. # /api/checkout
179179
180- - set(span.attributes["http.route"], "/api/products/{productId}") where
180+ - set(span.attributes["http.route"], "/api/products/{productId}") where
181181 span.kind == SPAN_KIND_SERVER and
182182 resource.attributes["service.name"] == "frontend" and
183183 span.attributes["http.route"] == nil and
184- IsMatch(span.attributes["http.target"], "\\/api\\/products\\/.*") # e.g. /api/products/1YMWWN1N4O
184+ IsMatch(span.attributes["http.target"], "\\/api\\/products\\/.*") # e.g. /api/products/1YMWWN1N4O
185185
186- - set(span.attributes["http.route"], "/api/recommendations") where
186+ - set(span.attributes["http.route"], "/api/recommendations") where
187187 span.kind == SPAN_KIND_SERVER and
188188 resource.attributes["service.name"] == "frontend" and
189189 span.attributes["http.route"] == nil and
190- IsMatch(span.attributes["http.target"], "\\/api\\/recommendations") # e.g. # /api/recommendations?productIds=...
190+ IsMatch(span.attributes["http.target"], "\\/api\\/recommendations") # e.g. # /api/recommendations?productIds=...
191191
192- - set(span.attributes["http.route"], "/api/data") where
192+ - set(span.attributes["http.route"], "/api/data") where
193193 span.kind == SPAN_KIND_SERVER and
194194 resource.attributes["service.name"] == "frontend" and
195195 span.attributes["http.route"] == nil and
196- IsMatch(span.attributes["http.target"], "\\/api\\/data.*") # e.g. # " /api/data?contextKeys=telescopes" or /api/data/?contextKeys=cameras
196+ IsMatch(span.attributes["http.target"], "\\/api\\/data.*") # e.g. # " /api/data?contextKeys=telescopes" or /api/data/?contextKeys=cameras
197197
198198 # SANITIZE ALL SPAN NAMES TO PREVENT CARDINALITY EXPLOSION
199199 - set_semconv_span_name("1.37.0", "original_span_name")
0 commit comments