-
Notifications
You must be signed in to change notification settings - Fork 361
Do the TelemetryAPI records support JSON record fields? #977
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
Comments
Looks like you're right! Feel free to modify this issue into a feature request, or take a stab at implementing it! One way to deal with this might be to encode it at the type level via a generic (or more likely a separate struct, since adding a generic to Maybe it would be better to newtype both of the inner record types and offer a You could MAYBE hack something together with a new typed inner enum that has an internally tagged variant for serde that uses one of the known json field names, and a I think probably Just sharing my perspective! (Not a maintainer / not offering to implement this) |
That all makes sense @jlizen. Yeah, we decided to go with a quick fix to swap these for |
cc @bnusunny for perspective on this one... my knee jerk is, probably not good to cut to modeling a That said I do think a |
According to the TelemetryAPI docs, if you're using a more recent schema version than "2022-12-13", the
record
field of function and extension logs may be a string OR a JSON record.From the code it would appear that these only support the string records. Do these need to be updated to something like
serde_json::Value
to handle both cases?aws-lambda-rust-runtime/lambda-extension/src/telemetry.rs
Lines 25 to 30 in f69280e
Thanks!
The text was updated successfully, but these errors were encountered: