No release in over 3 years
Low commit activity in last 3 years
Protobuf parser for Fluentd.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.3.0

Runtime

 Project Readme

fluent-plugin-parser-protobuf

Testing on Windows Testing on macOS Testing on Ubuntu

Fluentd parser plugin for Protocol Buffers.

Installation

Add this line to your application's Gemfile:

gem 'fluent-plugin-parser-protobuf'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install fluent-plugin-parser-protobuf

Prerequisites to use

Users should prepare protocol buffers with the following compilers:

Configuration

Note: Protocol Buffer v2 files use .pb.rb extensions whereas Protocol Buffer v3 files use _pb.rb in their filename endings. Please be careful which version is used in your protobuf definitions.

For Protobuf 3

<parse>
  @type protobuf
  class_file /path/to/your/protobuf/class_file_pb.rb
  class_name Your.Protobuf.Class.Name # For protobuf3
  protobuf_version protobuf3
  # suppress_decoding_error false
  # include_paths [/path/to/your/protobuf/class_file_pb.rb, /path/to/your/protobuf/class_file2_pb.rb, ...]
</parse>

Note: Protobuf version 3 requires to use dot for nested class name seperator:

Your::Protobuf::Class::Name class should be in class_name as follows:

class_name Your.Protobuf.Class.Name

For Protobuf 2

<parse>
  @type protobuf
  class_file /path/to/your/protobuf/class_file.pb.rb
  class_name Your::Protobuf::Class::Name # For protobuf2
  protobuf_version protobuf2
  # suppress_decoding_error false
  # include_paths [/path/to/your/protobuf/class_file.pb.rb, /path/to/your/protobuf/class_file2.pb.rb, ...]
</parse>

Development

After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/fluent-plugins-nursery/fluent-plugin-parser-protobuf.

Articles

LICENSE

Apache-2.0.