-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
fix(imports/logger): Loki not indexing varargs #583
Conversation
Hello, I would like to report a situation where the code is not working properly in my environment. Test code postBody PerformHttpRequest callback function Code to print data local postBody = json.encode({streams = tempBuffer})
print(postBody)
PerformHttpRequest(endpoint, function(...)
print(json.encode({...}))
end, 'POST', postBody, headers) |
The generated JSON works by posting it via HTTPie directly to loki. I think this is not related to this? Im using Loki 3.0.0, maybe there is a difference in the API? |
Just investigated a bit around the API and it seems that they added posting meta variables in the https://grafana.com/docs/loki/v2.8.x/api/#push-log-entries-to-loki If possible, can you upgrade to Loki 3.0.0 ? Can you check if the error persist on ox_lib v3.21.0 ? |
Just tested in loki 3.0.0 and ox_lib v3.21.0, get the same results as you, thank you for your reply. |
And I found the reason why you get "table":0x7fe593f2ca50". |
This reverts commit 7e67b57.
Revert "fix(imports/logger): loki indexing for varargs (overextended#583)"
Hey!
i dont know if this is expected behaviour and the loki provider probably needs more rework but i played around with it a bit and currently its submitting the data in a wrong format. The code i used to submit logs (test):
(before)
(after my changes)
I tried the following:
Which ended up in this:
Probably this need some more rework, i think submitting the meta data in this format
key:value
is inconvenient. But this is out-of-scope for this "fix" 🗡️