Comments (4)
Hello,
It looks like you want to set keep_key
to true
in your burrow configuration. You can read about that in the readme here https://github.com/vanilla/fluent-plugin-burrow/blob/master/README.md
action
can be one of 4 values: inplace
, overlay
, replace
, and prefix
. When using overlay
, the default behaviour is to remove the original encoded key, but keep_key
disables that.
Hope this fixes your issue.
from fluent-plugin-burrow.
That isn't what I need, that'd presumably keep the 'message' block for all events even if the nested value included a message
key or not.
The key being kept is the one from the object inside the message, not the original message itself.
from fluent-plugin-burrow.
I now see what you're saying. This might be a bug.
from fluent-plugin-burrow.
Could be that https://github.com/vanilla/fluent-plugin-burrow/blob/master/lib/fluent/plugin/filter_burrow.rb#L88-L93 is moved before the merger.
It still means that if you have a nested key you might overwrite the original value, but not sure theres anything that can be done about that if overlay
is chosen.
def filter(tag, time, record)
raw_value = record[@key_name]
if raw_value then
new_time, new_values = nil, nil
@parser.parse(raw_value) do |parsed_time, parsed_values|
new_time = parsed_time
new_values = parsed_values
end
if new_values then
original_time = record[@record_time_key]
new_time ||= original_time
# Remove the key before we merge the new values in case the merger re-creates the key
if ['overlay','replace','prefix'].include? @action
if not @keep_key and record.has_key?(@key_name)
record.delete(@key_name)
end
end
# Overlay new record on top of original record?
new_record = case @action
when 'inplace'
record.merge({@key_name => new_values})
when 'overlay'
record.merge(new_values)
when 'replace'
new_values
when 'prefix'
record.merge({@data_prefix => new_values})
end
# Preserve 'time' key?
if @keep_time
new_record[@record_time_key] = original_time
end
new_record
end
end
end
from fluent-plugin-burrow.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluent-plugin-burrow.