alloy
alloy copied to clipboard
Provide route decorator similar to Grafana Beyla
Request
Hi, I would like to request a new feature called route decorator similar to Grafana Beyla. It works like this (in Beyla config)
routes:
patterns:
- /user/{id}
- /user/{id}/basket/{product}
and it would match /user/123
and /user/456
and it would include /user/{id}
in the trace property.
Hope that there is a URL parsing function or a dedicated block called matchRoute
in log.process
component to process the HTTP path like this.
Indeed, we have regex
and replace
block in log.process
component. However, it's not powerful enough.
Use case
Like I mentioned in #1592, I would to pre-process the performance resource metrics sent by Faro SDK. There is a event_data
field in the faro.receiver
log and it would have the full path of HTTP request. I want to remove any parameters, hostname, and any GET single resource (/user/{id}
) before sending to Grafana Loki. By configuring these, I could transform the logql query into Prometheus metrics by Loki rulers.