How to add a new field which starts with hash symbol (#) in remap transform? #14191
-
Hi, I'm using
Then it looks like that Vector omits the #type and #environment fields. I don't see them in the vector tap output and in vector console where I send the events. But I do see the "start" and "end" log records in the vector's console, so the transform works. Is it possible to add fields like P.S. I guess it is possible via add_fields transform, but as I understood it is deprecated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
👋 The docs note that characters that are not "alpha-numeric characters and $ ."#foo" = "bar"
"bar"
$ .
{ "#foo": "bar" } So your example should be rewritten as: docker_generic_logs_transform:
type: remap
inputs:
- docker_db_logs_label
source: |-
""
log("start")
."#type" = "docker_generic"
."#environment" = "staging"
log("end")
"" |
Beta Was this translation helpful? Give feedback.
👋
The docs note that characters that are not "alpha-numeric characters and
_
" should be quoted.So your example should be rewritten as: