Hello,
I am storing event objects as jsons in Loki.
E.G.
{
"streams": [
{
"stream": {
"stream": "operational-events"
},
"values": [
[
"1676976338000000000",
"{"event_type": "test_event", "severity": "INFO", **additional_metadata, "data": {**event_data}}"
]
]
}
]
}
Then I would like to fetch these objects back. Is it possible to query in a way where can I sort events, limit them and filter them by the properties inside the json?
I went trough the docs but it does not seem like these features are possible.
I would expect query in this form: {stream=“operational-events”} | sort timestamp desc | limit 20
I am new to Grafana query language so I am not sure if I am missing something or these usecases are not supported.
Thanks for answers.