-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Event type in lua is userdata, not table #1297
Comments
Hi @mikhno-s, thanks for letting us know. We'll update the docs. Additionally, we're about to make a bunch of improvements to our |
@binarylogic hey, I need to move nested fields around, so userdata field basically means I can't use vector at all, because there is no way to manipulate a dynamic set or fields (labels, for instance). With userdata event["root.nested.key"] is a string, for instance, but event["root.nested"] is nil. UPD: Alternatevily, there probably should be a way to manipulate event fields without scripting. Lua should be used for something complex, while simple rearranging should be done with add_field transform (or move_field\copy\etc) |
Hey @WillDrug, sorry about that and thanks for letting us know. We just started working through https://github.com/timberio/vector/milestone/23, where we expect to improve the
@a-rodin is owning that project and I expect that we'll address this properly within 3-4 weeks. @a-rodin is there a simple workaround in the interim? Ideally, something that aligns with further changes we're going to make. If not, then we should have something within the timeframe stated. |
@binarylogic well, after the update, at least pairs function works correctly, so if the matter is pressing we can use it (also, |
I wanted suggest to use However, we do plan to change the nesting approach, so that the nested fields would be represented as nested tables instead of flat key values with dots. |
Hi!
Docs says that event has lua type
table
, I getuserdata
, hence, I cannot usepairs
function.My configuration:
OS: OS X 10.14.6
Vector ver.:vector 0.6.0-nightly (the same problem on v0.4.0 and 0.5.0, probably)
config.toml:
error.log:
output:
As you can see
print(type(event))
- printeduserdata
, not atable
as I expected due to docs.The text was updated successfully, but these errors were encountered: