77# ' [jsonlines](https://jsonlines.org/) log files. This provides a
88# ' nice balance between human- an machine-readability.
99# '
10- # ' This Layout provides 4 ways to transform the event before ingestion into
11- # ' Dynatrace:
1210# '
13- # ' 1. `transform_event` a generic function to transform the event
14- # ' 2. `timestamp_fmt`
15- # ' 2. `transform_event_names` a named `character` vector or a second
11+ # ' @section Event transformation:
12+ # ' This Layout provides 4 ways to transform the event before serialization:
13+ # '
14+ # ' 1. `transform_event`: a generic function to transform the event
15+ # ' 2. `timestamp_fmt`: a format string or function to apply to the timestamp field
16+ # ' 3. `transform_event_names`: a named `character` vector or a second
1617# ' function to rename fields
17- # ' 3 . `excluded_fields` a `character` vector to include fields.
18+ # ' 4 . `excluded_fields`: a `character` vector to include fields.
1819# '
1920# ' In theory supplying a custom `transform_event` function is enough to
20- # ' transform the event , but the other two parameters are provided for
21+ # ' perform all these actions , but the other three parameters are provided for
2122# ' convenience. Please note that they are applied in order (e.g. if you
2223# ' rename a field you have to exclude the *renamed* field to really exclude it).
2324# '
@@ -48,7 +49,8 @@ LayoutJson <- R6::R6Class(
4849 # '
4950 # ' @param toJSON_args a list of arguments passed to [jsonlite::toJSON()],
5051 # '
51- # ' @param timestamp_fmpt
52+ # ' @param timestamp_fmt Format to be applied to the timestamp. This is
53+ # ' applied after `transform_event()` but `before transform_event_names()`
5254 # ' * `NULL` (the default): formatting of the timestamp is left to
5355 # ' [jsonlite::toJSON()],
5456 # ' * a `character` scalar as for [format.POSIXct()], or
@@ -59,13 +61,13 @@ LayoutJson <- R6::R6Class(
5961 # ' @param transform_event a `function` with a single argument `event` that
6062 # ' takes a [LogEvent] object and returns a list of values.
6163 # '
62- # ' @param excluded_fields A `character` vector of field names to exclude
63- # ' from the final output. passed to `transform_event()`.
64- # '
6564 # ' @param transform_event_names A named `character` vector mapping original
6665 # ' field names to Dynatrace-compatible ones, or a function with a single
6766 # ' mandatory argument that accepts a character vector of field names.
68- # ' passed to [transform_event()].
67+ # ' Applied after to `transform_event()`.
68+ # '
69+ # ' @param excluded_fields A `character` vector of field names to exclude
70+ # ' from the final output. Applied after `transform_event_names`.
6971 initialize = function (
7072 toJSON_args = list (auto_unbox = TRUE ),
7173 timestamp_fmt = NULL ,
0 commit comments