LogQL support #11130
Replies: 6 comments 26 replies
-
|
@weixiang1862 thanks for bringing this up, I'd love to see this feature! |
Beta Was this translation helpful? Give feedback.
-
|
Loki re-license it's license from apache-2 to agpl-v3 since this commit, a part of code was migrate to agpl-v3. Now, log query protocol is under apache-2 but the logql lexer and parser is under agpl-v3: In this commit, I found two articles about this change from grafana:
After I read it, I feel pessimistic about LogQL implemention in SW. I just want do some contributes to SW community but not troubles. |
Beta Was this translation helpful? Give feedback.
-
Ok, I will complete proposal doc first. |
Beta Was this translation helpful? Give feedback.
-
|
As what we implement is not a full features LogQL, I build a dashboard using loki ui component rather than using native loki query page, I think this is what we need, now logs and metrics all can show by grafana. Do you think it is ok? |
Beta Was this translation helpful? Give feedback.
-
BackgroundSkywalking already supported PromQL in metric query, user can easily build a metric dashboard in third-party systems which support PromQL (such as Grafana). However, skywalking is a full stack apm system, there are other features provided by skywalking like logs. If user already build a dashboard on Grafana, it's inconvenient for him to query logs between offical native ui and grafana when he find some abnormal metrics in dashboard and want to figure out what happened in that moment. If we implement LogQL, we can provide user an alternative choice in log query. Query Data FlowLogQL SupportAs skywalking log mechanism is different from loki, The LogQL implemented by skywalking won't be a full features LogQL. The picture above is LogQL syntax in log querys, it is composed of the following parts(feature with [✅] is what we need):
The operator support by LogQL is composed of the following(operator with [✅] is what we need):
Some typical expression used in skywalking log query: Http API Support1. /loki/api/v1/labelsquery which labels are support in stream selector, in skywalking, they are fixed value: service、service_instance、endpoint、trace_id. 2. /loki/api/v1/label/{label_name}/valuesquery label values of label, in skywalking, they are service_traffic、instance_traffic、endpoint_traffic. 3. /loki/api/v1/seriesFinding series by label matchers, it is used in query condition select. 4. /loki/api/v1/query_rangequery logs in time range with LogQL expression. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.







Uh oh!
There was an error while loading. Please reload this page.
-
Based on @wankai123 works on promql, I try to implement loki query protocol(LogQL) on skywalking and validated the feasibility. I want to confirm whether LogQL can be accepted by skywalking community. Should I keep working on this?
Beta Was this translation helpful? Give feedback.
All reactions