Looking for a way in Grafana Alloy to automatically extract all fields from a JSON log without listing every attribute in the config. Right now, I have to specify each field with the expressions option in stage.json, like this:
stage.json {
expressions = {
datetime = “time”,
log_level = “level”,
msg = “msg”,
component = “component”,
// …must add every key
}
}
Is there a wildcard or one-line syntax to grab all JSON fields automatically?
example log:
{"time":"2025-10-11T01:00:00Z","level":"info","msg":"example log","component":"dataset","source":"infra"}