All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Complete removal of
preserve_to
setting and ensureparse_from
field is always retained. (PR468)
Several changes have been made that affect configuration for the filelog
, syslog
, tcplog
, udplog
, and journald
receivers.
Update all usages of field syntax
Field syntax no longer requires the $
character. Instead each field must begin with body
, attributes
, or resource
.
Deprecated Example | Updated Equivalent |
---|---|
|
|
|
|
|
|
|
|
|
|
To update the parse_from
field in a "sub-parser", such as timestamp
or severity
, consider where the value would reside if the sub-parser was excluded.
Deprecated Example | Updated Equivalent |
---|---|
operators:
- type: regex_parser
regex: '^Time=(?P<time>\d{4}-\d{2}-\d{2})...'
parse_to: body # default
timestamp:
parse_from: time
... |
operators:
- type: regex_parser
regex: '^Time=(?P<time>\d{4}-\d{2}-\d{2})...'
parse_to: attributes # default
timestamp:
parse_from: attributes.time
... |
Field syntax can now refer to nested fields in both attributes
and resource
. Nested fields were previously only supported in body
. For example, attributes.foo.bar
refers to the value "hello"
in the following entry:
{
"attributes": {
"foo": {
"bar": "hello"
}
}
}
The default value of parse_to
has been changed from body
to attributes
. As a general rule of thumb, any parsers that previously specified the parse_to
field are unaffected. If the parse_to
field was not previously specified, then subsequent operators may need to be updated.
Deprecated Example | Updated Equivalent |
---|---|
operators:
- type: regex_parser
regex: '^Foo=(?P<foo>\s.*)...'
parse_from: body
# parse_to: body (old default)
- type: move
from: foo
to: attributes.bar
... |
operators:
- type: regex_parser
regex: '^Foo=(?P<foo>\s.*)...'
parse_from: body
# parse_to: attributes (new default)
- type: move
from: attributes.foo
to: attributes.bar
... |
Parsers no longer support a preserve_to
setting. Instead, the parse_from
field is preserved by default. To preserve and move the field, use the move
operator after the parse operator. To remove the field after parsing, use the remove
operator.
Deprecated Example | Updated Equivalent |
---|---|
operators:
- type: regex_parser
regex: '^Foo=(?P<foo>\s.*)...'
parse_from: body
preserve_to: attributes.backup
... |
operators:
- type: regex_parser
regex: '^Foo=(?P<foo>\s.*)...'
parse_from: body
- type: move
from: body
to: attributes.backup
... |
operators:
- type: regex_parser
regex: '^Foo=(?P<foo>\s.*)...'
parse_from: body # implicitly deleted
... |
operators:
- type: regex_parser
regex: '^Foo=(?P<foo>\s.*)...'
parse_from: body
- type: remove
field: body
... |
The restructure
operator has been removed. Use add
, copy
, flatten
, move
, remove
, and retain
operators instead.
Deprecated Example | Updated Equivalent |
---|---|
operators:
- type: restructure
ops:
- add:
field: set_me
value: foo
- add:
field: overwrite_me
value: bar
- move:
from: details.env
to: env
- remove:
field: delete_me |
operators:
- type: add
field: body.set_me
value: foo
- type: add
field: body.overwrite_me
value: bar
- type: move
from: body.details.env
to: body.env
- type: remove
field: body.delete_me |
The metadata
operator has been removed. Use add
, copy
, or move
operators instead.
Deprecated Example | Updated Equivalent |
---|---|
operators:
- type: metadata
attributes:
environment: production
file: 'EXPR( $$body.file )'
resource:
cluster: blue |
operators:
- type: add
field: attributes.environment
value: production
- type: copy
from: body.file
to: attributes.file
- type: add
field: resource.cluster
value: blue
- type: move
from: body.foo
to: attributes.bar |
The filelog
receiver has adopted slightly different attribute names in order to match newly established semantic conventions. Configurations that previously refered to the file.*
attributes should be updated.
Deprecated Attribute | Updated Equivalent |
---|---|
|
|
|
|
|
|
|
|
A recent change to the Log Data Model has redefined the usage of the Timestamp
field. Correspondingly, this field is no longer initialized by default. All Log Exporters should be evaluated to ensure this change is handled accordingly.
Log exporters can use the following logic to mimic the previous functionality (psuedocode):
timestamp := log.ObservedTimestamp
if log.Timestamp != nil {
timestamp = log.Timestamp
}
- The default value of
parse_to
field in all parsers has been changed toattributes
. (PR463) - Parsers that contain a
parse_to
setting will no longer delete theparse_from
field. (PR464) - The
preserve_to
setting has been removed from parsers. (PR464)
key_value_parser
(PR459)severity
parsign can now usepreset: otel
to recognize both numeric and text representations of OpenTelemetry's log data model. (PR460)regex_parser
can now cache parsing parsing results using thecache
setting. This can dramatically increase performance in cases where the same string is parsed repeatedly. (PR440)
- Issue where scope name parser would fail to initialize. (PR465)
$
has been removed from field syntax. (PR364)- Use
body
instead of$body
.- e.g.
body.foo
.
- e.g.
- Use
attributes
instead of$attributes
.- e.g.
attributes.["log.file.name"]
- e.g.
- Use
resource
instead of$resource
.- e.g.
resource.["host.name"]
- e.g.
- There is no longer a default top-level field.
- i.e.
foo
is no longer equivalent to$body.foo
. (It is invalid.)
- i.e.
- A top-level field MUST be specified at the beginning of each field.
- e.g.
body.foo
,attributes.foo
, orresource.foo
.
- e.g.
- Use
entry.Entry.Timestamp
field is no longer required and is not initialized by default. (PR370)- The value can be set using the
timestamp
block on any parser, or the using the standalonetime_parser
operator.
- The value can be set using the
- Removed
metadata
operator. (PR429)- Use
add
,copy
, ormove
operators instead.
- Use
- Removed
restructure
operator. (PR371)- Use
add
,copy
,flatten
,move
,remove
, andretain
operators instead.
- Use
- Changed the names of attributes added by
file_input
operator to match new semantic conventions. (PR372) - Switch to original
go-syslog
library, restoring strict enforcement of SD-NAME length. (PR439)
- Revert version update on go-syslog, which introduced incompatibility with 386 architecture. (PR438)
- Issue where pipelines could fail to build when running on Go 1.18. (PR347)
entry.Entry.ObservedTimestamp
field. This is initialized automatically when an entry is created. (PR370)entry.Entry.ScopeName
field. This field will be used in the collector to group related log entries. (PR397)- A
scope_name
block is now supported by every parser. Alternately, use the standalonescope_name_parser
operator.
- A
csv_parser
can now handle fields containing line breaks. (PR425)
- Issue where
recombine
operator would combine entire file in certain specific circumstances. (PR416)
source_identifier
setting torecombine
operator, to ensure partial entries are joined to others from the same file, or other source. (PR341)max_sources
setting torecombine
operator, which limits the number of unique sources that may accumulate partial entries. (PR341)
- Time parsing will now correctly parse timestamps from 1970. (PR417)
- Issue where
file_input
operator could duplicate a small number of log entries. (PR413)
entry.Attributes
data type frommap[string]string
tomap[string]interface{}
. (PR401)entry.Resource
data type frommap[string]string
tomap[string]interface{}
. (PR411)
write_to
configuration setting from all input operators. Usemove
operator instead. (PR412)
This release contains a few minor updates as well as a major cleanup of the codebase. See the Reduce Complexity milestone for full details on the cleanup.
source_identifier
setting torecombine
operator, to ensure partial entries are joined to others from the same file, or other source. (PR341)max_sources
setting torecombine
operator, which limits the number of unique sources that may accumulate partial entries. (PR341)
- On Windows,
file_input
will immediately close files after reading. (PR366)
- When
file_input
cannot open a file, it will print a debug level log instead of an error level log. (PR357)
force_flush_period
setting torecombine
operator, to prevent recombine taking to long to process (PR325)lazy_quotes
setting tocsv
parser operator. When enabled will preserve internal quotes in a csv field (PR324)header_attribute
setting tocsv
parser operator. When set will dynamically parse the csv headers from the specified attribute on a log entry. (PR335)
- Updated CSV Parser to use idiomatic Go errors (PR323)
combine_with
setting torecombine
operator, to allow for joining on custom delimiter (PR315)
- Issue where
force_flush_period
could cause line splitting to be skipped (PR303) - Issue where
tcp_input
andudp_input
could panic when stopping (PR273) - Syslog severity mapping is now aligned with log specification (PR300)
- Improve error message when timezone database is not found (PR289)
- Issue in
file_input
where doublestar globbing could only be used at a single level (PR268) - Bug in
tcp_input
,udp_input
, andsyslog_input
which could cause a panic (PR273) - Made
windows_event_log_input
compatibile with Windows Server 2022 (PR283)
file_input
will now emit bytes whenencoding = nop
(PR262)
- The
timestamp
operator can now parse timestamps that use a comma separator (Go v1.17) journald_input
now acceptsunits
andpriority
settings (PR252)file_input
will now trim whitespace when usingmultiline
(PR212)
- Operator IDs are now autogenerated sequentially, removing the necessity to specify the
id
field in most circumstances (PR246) - Updated to go version 1.17 (PR248)
file_input
'sforce_flush_period
now defaults to500ms
, ensuring that the use ofmultiline.line_start_regex
does not cause ommision of the last line of each file (PR261)
file_input
operator can now be configured to flush incomplete logs, using theforce_flush_period
setting (PR216)
severity
levels have been redefined to match OpenTelemetry standard levels (PR228)
multiline
splitting now trims whitespace characters (PR212)windows_eventlog_input
log input now gives a helpful error message when a metadata request fails (PR206)
csv_parser
(PR123)multiline
,encoding
, andmax_log_size
options toudp_input
(PR127)file_input
now hasinclude_file_name_resolved
andinclude_file_path_resolved
settings which produce attributesfile.name.resolved
andfile.path.resolved
, respectively (PR189)- GoSec workflow added to GitHub Actions (PR154)
- CodeQL workflow added to GitHub Actions (PR153)
file_input
's defaultencoding
is nowutf8
(PR147)file_input
'sinclude_file_name
andinclude_file_path
settings now produce attributesfile.name
andfile.path
, respectively (PR189)
file_input
can now track files that are rotated out of theinclude
pattern matches (PR182)- Noisy log message in
file_input
(PR174) - Issue where failed parse operation could duplicate log entry (PR188)
- Parsers will no longer process
[]byte
data type (PR149)
file_input
now supports multi-level directory globs (i.e./var/**/logs/**/*.log
) (PR97)add
,remove
,move
,copy
,retain
, andflatten
operators, as alternatives to therestructure
operator.add_attributes
option totcp_input
andudp_input
, for capturing network attributes (PR108)multiline
,encoding
, andmax_log_size
options totcp_input
(PR125)
- Database package. The same functionality is supported via a
Persister
interface, passed toStart
methods (PR93)
- Issue where
tcp_input
could panic or spam logs (PR130)
- Trace fields added to
entry.Entry
, and an accompanyingtrace
parser (PR76) - Severity parser can parse whole numbers formatted as
float64
(PR90) - Support for
mapstructure
to most configs
- Rename
entry.Record
toentry.Body
(PR88)
syslog_input
config embedssyslog_parser
at the top level, rather than under asyslog
key (PR43)- Rename
entry.Label
toentry.Attribute
(PR51)
- Several unused packages, including
flusher
,buffer
,k8smetadata
,hostmetadata
, andratelimit
(PR53)
- Optional
max_buffer_size
parameter totcp_input
operator (PR35) - TLS support to
tcp_input
operator (PR29)
- Data race in syslog parser (PR32)
syslog_input
operator, which combinestcp_input
,udp_input
, andsyslog_parser
into a single operator. (PR24)- Syslog operator RFC 3164 location parameter (PR11)
uri_parser
operator (PR12)
forward_input
andforward_output
, which were previously intended for use in the standalone agent (PR27)
- Remove standalone agent functionality
- Simplifies modules
- Combines
parser/syslog
andinput/windows
modules into the primary module - Removes output operators that were previously separate modules
- Leaves
input/k8sevent
andtransformer/k8smetadata
as separate modules for now. These two have extensive dependencies and their usefulness in the collector needs to be discussed before merging or removing.
- Combines
- Allow plugin parameters to have a default value even if they are required
- Updated version of stanza used in several isolated modules
timestamp
parser now supports alocation
parameter
k8s_metadata_decorator
using a proxy causes internal API timeout
file_input
exclude processing could result in extra exclusions
- Ability to customize
file_input
'sfingerprint_size
- Issue where timestamps ending 'Z' were not treated as UTC
- Issue where recognized timezones may not properly calculate offsets
- Issue where
file_output
would escape html special characters
- Issue where flushers would retry indefinitely
- Issue where flushers would improperly reuse the same http request multiple times
- Recombine operator to combine multiline logs after ingestion and parsing
- Issue where entries skipped by
if
would be output twice
- New operators
forward_output
andforward_input
to easily send log entries between stanza instances. - Override default timestamp with
STANZA_DEFAULT_TIMESTAMP
for integration testing - Add new
bytesize
type for easier configuration of byte sizes - Automatic severity promotion in the syslog parser
- Open files in chunks so that we don't hit open file limit and cause performance issues
- New parameter
if
to parser plugins to allow for easy conditional parsing without routers - New
default
parameter to the router to explicitly send unmatched entries to a specific operator(s)
- Missing default configuration of
elastic_output
flusher
- A plugin that fails to parse will now log an error, but will not cause stanza to fail to start
- New
stdin
operator
- OTLP severity level recognition
- Severity Text field on Entry
- Removed
preserve
in favor ofpreserve_to
to make it more clear that it may overwrite parsed fields - Updated our internal log sampling numbers to more aggressively sample repeated logs
- Log message whenever a new file is detected
windows_eventlog_input
can now parse messages from the Security channel.
- Router outputs were not namespaced correctly
- (De)serialization of JSON for plugin config structs
- New Relic Logs output operator
- Additional resource values with parent object names (service name, replica set name, etc.) in the k8s metadata operator
- Publicly available
version.GetVersion()
for consumers of thestanza
module
- Most operators are no longer part of dedicated modules
- File input improvements and rotation tests
- Disk buffer for output operators (PR109)
- Split buffers into buffers and flushers for better modularity (PR109)
- New memory buffer design for a uniform interface between disk and memory buffers (PR109)
- Most operators are now dedicated modules, so that they may be imported individually (PR108)
- Rendering issue with the
kubernetes_events
plugin
- Support for accessing the resource with fields (PR105)
- Support for using fields to select keys that contain dots like
$record['field.with.dots']
(PR105) google_cloud_output
will use resource create a monitored resource for supported resource types (currently only k8s resources) (PR105)
- The operators
host_metadata
,k8s_event_input
, andk8s_metadata_decorator
will now use the top-level resource field (PR105) k8s_metadata_decorator
now generates pod labels that match those generated by GKE (PR105)
- Issue with
k8s_event_input
generating entries with zero-valued time (PR105) - Plugin ID in templates will now correctly default to the plugin type if unset (PR105)
- Agent is now embeddable with a default output
- The 'filter' operator
- Renamed project to
stanza
- Move
testutil
package out ofinternal
- The
Resource
field was added to Entry (PR95) - The
Identifier
helper was created to assist with writing toResource
(PR95)
- The
Tags
field was removed from Entry (PR95)
- The
host_metadata
operator now writes to an entry'sResource
field, instead of Labels - The
host_labeler
helper has been renamedhost_identifier
- The
metadata
operator embeds theIdentifier
helper and supports writing toResource
- Input operators embed the
Identifier
helper and support writing toResource
- The
k8s_event
operator now supports thewrite_to
,labels
, andresource
configuration options - Multiline for
file_input
now supports matching on new lines characters (PR96)
- Kubernetes events input operator (PR88)
- Small improvements to test stability
- Fallback to reflection to convert entries to Google Cloud log entries (PR93)
- Google Cloud Output failure when sent a field of type uint16 (PR82)
- Added a default function to plugin templates (PR84)
- Add a host metadata operator that adds hostname and IP to entries (PR85)
- Google Cloud Output option to enable gzip compression (PR86)
- In the file input operator, file name and path fields are now added with
include_file_name
(defaulttrue
) andinclude_file_path
(defaultfalse
) - Input and router operators can define labels on entries using the
labels
field - Add Event ID to windows event log entries
- Use the
go-syslog
fork directly rather than relying on areplace
directive so that the agent can be used as a library successfully
- Fork go-syslog to support long sdnames that are not rfc5424-compliant
- Reduce noise in debug messages for TCP and UDP inputs
log_type
label added by default to input operators
- Trim carriage returns from TCP input
- Configurable
timeout
parameter for thek8s_metadata_decorator
(PR54) - Journald operator now supports
start_at
parameter (PR55)
- Enhanced plugin parameter metadata structure, to support required/optional and default values (PR59)
- Issue where multiple instances of
syslog_parser
would cause parsing errors (PR61) short destination buffer
error now is handled by increasing encoding buffer size (PR58)- Issue where omitting the output field in a plugin could result in errors (PR56)
- Allow omitting
id
, defaulting to plugin type if unique within namespace - Allow omitting
output
, defaulting to the next operator in the pipeline if valid
- Support for multiple encodings in the file input plugin (PR39)
- Install scripts and docker image now include plugins from
stanza-plugins
repository (PR45) - Publish image to dockerhub (PR42)
- Improved default configuration (PR41)
- Basic developer documentation (PR43)
- JournalD emits
map[string]interface{}
(PR38)
- Link
stanza
into/usr/local/bin
so it's available on most users'PATH
(PR28) - New parameter
file_name_path
to the file input plugin for cases when just the file name is needed
- Renamed
path_field
tofile_path_field
in the file input plugin
- Failure in Google Cloud Output to convert some data types to protocol buffers
- Writing from files being actively written to will sometimes read partial entries (PR21)
- Minor documentation omissions
- Initial open source release. See documentation for full list of supported features in this version.