Skip to content

Commit

Permalink
Add second example to ScribbleDecoder
Browse files Browse the repository at this point in the history
While there, also make a explicit comment regarding the current
implementation of the sandboxed lua decoders, which will discard
previously scribbled fields
  • Loading branch information
ioc32 committed Sep 10, 2015
1 parent 1fe36bd commit 6729a5b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/source/config/decoders/scribble.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,33 @@ Config:

Example (in MultiDecoder context)

.. code-block:: ini
[AccesslogDecoder]
type = "MultiDecoder"
subs = ["AccesslogApacheDecoder", "EnvironmentScribbler"]
cascade_strategy = "all"
log_sub_errors = true
[AccesslogApacheDecoder]
type = "SandboxDecoder"
filename = "lua_decoders/apache_access.lua"
[AccesslogApacheDecoder.config]
type = "combinedio"
user_agent_transform = true
user_agent_conditional = true
log_format = '%h %l %u %t %m \"%U\" \"%q\" \"%H\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %I %O'
[EnvironmentScribbler]
type = "ScribbleDecoder"
[EnvironmentScribbler.message_fields]
Environment = "production"
You can also add static fields to messages decoded by a downstream heka instance
that forwards messages for further processing.

.. code-block:: ini
[mytypedecoder]
Expand All @@ -46,3 +73,7 @@ Example (in MultiDecoder context)
[mytype.message_fields]
Type = "MyType"
Message scribbling is commonly performed after the lua sandboxed decoders have been
applied. Otherwise the scribbled field may get discarded, depending on the
decoder implementation.

0 comments on commit 6729a5b

Please sign in to comment.