-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide route decorator similar to Grafana Beyla #1596
Comments
I notice that alloy do have loki.template, and it support sprig URL parsing. I think it could meet my need, and I would close this issue. |
Reopen here since I want to provide the following config to component or stage.
|
Hi, @titaneric! Do I understand correctly that |
Hi @ptodev, thanks for response. Basically, yes, and I think present alloy component could not handle multiple URL paths easily. Multiple I think Given the URL
I hope this config could output Hope that |
There is no further response here, could I volunteer to implement this feature and raise PR? |
Hi @titaneric, apologies for the delayed response! IIUC, you'd like to replace the log line with a redacted URL? E.g. if the log is "a rq on /user/1234", then the output log will be simply "/user/{id}"? And then you'd like to query the number of "/user/{id}" logs, and generate a metric? I'm just not sure why you wouldn't simply use stage.metrics to generate the metric directly in alloy? |
Yes, I have used |
Request
Hi, I would like to request a new feature called route decorator similar to Grafana Beyla.
It works like this (in Beyla config)
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
inlog.process
component to process the HTTP path like this.Indeed, we have
regex
andreplace
block inlog.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 thefaro.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.The text was updated successfully, but these errors were encountered: