https://signoz.io logo
#support
Title
# support
z

Zhichao Gao

11/01/2023, 10:02 AM
Hi, We are going to use SigNoz to collect some client logs and generate a line chart based on the properties of the logs. How do we write rules in the Query Builder? For example, my log is first picture,How should I write a rule that can generate values where x is time and y is data.fcp?
n

Nočnica Mellifera

11/02/2023, 5:17 PM
ooooh that's an interesting question @Zhichao Gao, let me try formulating an example query to see if I can demonstrate this. Question: are you trying to sum data.fcp within a certain timespan? So like if you have two log lines in the same minute that are
data.fcp:500
you'd want the behavior to be plotting a value of
1000
?
s

Srikanth Chekuri

11/03/2023, 2:37 AM
generate a line chart based on the properties of the logs. How do we write rules in the Query Builder?
Use count. The body can be filtered like this
body.data.e = local
. You can use any key, operator, but the key needs to have prefix
body.
z

Zhichao Gao

11/03/2023, 5:34 AM
I tried putting the data on the same layer to handle this and it seems to be ok.