Skip to content

Commit 007c230

Browse files
rubenvp8510max-cx
authored andcommitted
TRACING-4069: Add docs for filelog receiver component
Signed-off-by: Ruben Vargas <[email protected]>
1 parent cec5669 commit 007c230

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

modules/otel-collector-components.adoc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,32 @@ The OpenCensus receiver provides backwards compatibility with the OpenCensus pro
199199
Wildcards with `+*+` are accepted under the `cors_allowed_origins`.
200200
To match any origin, enter only `+*+`.
201201

202+
[id="filelog-receiver_{context}"]
203+
=== Filelog Receiver
204+
205+
:FeatureName: The Filelog Receiver
206+
include::snippets/technology-preview.adoc[]
207+
208+
The Filelog Receiver tails and parses logs from files.
209+
210+
.OpenTelemetry Collector custom resource with the enabled Filelog Receiver that tails a text file
211+
[source,yaml]
212+
----
213+
receivers:
214+
filelog:
215+
include: [ /simple.log ] # <1>
216+
operators: # <2>
217+
- type: regex_parser
218+
regex: '^(?P<time>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) (?P<sev>[A-Z]*) (?P<msg>.*)$'
219+
timestamp:
220+
parse_from: attributes.time
221+
layout: '%Y-%m-%d %H:%M:%S'
222+
severity:
223+
parse_from: attributes.sev
224+
----
225+
<1> A list of file glob patterns that match the file paths to be read.
226+
<2> An array of Operators. Each Operator performs a simple task such as parsing a timestamp or JSON. To process logs into a desired format, chain the Operators together.
227+
202228
[id="processors_{context}"]
203229
== Processors
204230

0 commit comments

Comments
 (0)