Skip to content

Commit 867d484

Browse files
authored
Merge pull request #75550 from max-cx/TRACING-4069
OBSDOCS-1034/TRACING-4069: Write docs for the filelog receiver component
2 parents cdf63cf + 007c230 commit 867d484

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
@@ -336,6 +336,32 @@ The OpenCensus receiver provides backwards compatibility with the OpenCensus pro
336336
Wildcards with `+*+` are accepted under the `cors_allowed_origins`.
337337
To match any origin, enter only `+*+`.
338338

339+
[id="filelog-receiver_{context}"]
340+
=== Filelog Receiver
341+
342+
:FeatureName: The Filelog Receiver
343+
include::snippets/technology-preview.adoc[]
344+
345+
The Filelog Receiver tails and parses logs from files.
346+
347+
.OpenTelemetry Collector custom resource with the enabled Filelog Receiver that tails a text file
348+
[source,yaml]
349+
----
350+
receivers:
351+
filelog:
352+
include: [ /simple.log ] # <1>
353+
operators: # <2>
354+
- type: regex_parser
355+
regex: '^(?P<time>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}) (?P<sev>[A-Z]*) (?P<msg>.*)$'
356+
timestamp:
357+
parse_from: attributes.time
358+
layout: '%Y-%m-%d %H:%M:%S'
359+
severity:
360+
parse_from: attributes.sev
361+
----
362+
<1> A list of file glob patterns that match the file paths to be read.
363+
<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.
364+
339365
[id="processors_{context}"]
340366
== Processors
341367

0 commit comments

Comments
 (0)