Update log-collection to v0.29.0 (final independent release) #9139
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Several changes have been made that affect configuration for the
filelog
,syslog
,tcplog
,udplog
, andjournald
receivers. The following is a user guide for upgrading from Collector v0.48.0 to v0.49.0.Updating Receiver Configuration
Update all usages of field syntax
Field syntax no longer uses the
$
character. Instead each field must begin withbody
,attributes
, orresource
.$$attributes["log.file.name"]
attributes["log.file.name"]
$$resource["host.name"]
resource["host.name"]
$$body.foo
body.foo
$$.foo
body.foo
foo
body.foo
Tip for updating sub-parsers
To update the
parse_from
field in a "sub-parser", such astimestamp
orseverity
, consider where the value would reside if the sub-parser was excluded.attributes
andresource
now support arbitrary structureField syntax can now refer to nested fields in both
attributes
andresource
. Nested fields were previously only supported inbody
. For example,attributes.foo.bar
refers to the value"hello"
in the following entry:Update references to parsed values
The default value of
parse_to
has been changed frombody
toattributes
. As a general rule of thumb, any parsers that previously specified theparse_to
field are unaffected. If theparse_to
field was not previously specified, then subsequent operators may need to be updated.Remove or replace usages of
preserve_to
Parsers no longer support a
preserve_to
setting. Instead, theparse_from
field is preserved by default. To preserve and move the field, use themove
operator after the parse operator. To remove the field after parsing, use theremove
operator.Replace usages of
restructure
operatorThe
restructure
operator has been removed. Useadd
,copy
,flatten
,move
,remove
, andretain
operators instead.Replace usages of
metadata
operatorThe
metadata
operator has been removed. Useadd
,copy
, ormove
operators instead.Update
filelog
attribute referencesThe
filelog
receiver has adopted slightly different attribute names in order to match newly established semantic conventions. Configurations that previously refered to thefile.*
attributes should be updated.file.name
log.file.name
file.path
log.file.path
file.name.resolved
log.file.name_resolved
file.path.resolved
log.file.path_resolved
Note to Vendors: A log record's
Timestamp
field may now benil
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):
log-collection v0.29.0 Release Notes
Breaking Changes
parse_to
field in all parsers has been changed toattributes
. (PR463)parse_to
setting will no longer delete theparse_from
field. (PR464)preserve_to
setting has been removed from parsers. (PR464)Added
key_value_parser
(PR459)severity
parsing 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)Fixed