You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Add the `filelog` receiver**: The Filelog receiver reads log data from a file and includes custom resource attributes in the log data:
11
+
-**Add the `filelog` receiver**: The [**FileLog Receiver**](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/filelogreceiver/README.md) reads log data from a file and includes custom resource attributes in the log data:
12
12
13
13
```yaml
14
-
# Define a filelog receiver named "quotes"
15
-
filelog/quotes:
16
-
# Specifies the file to read log data from (quotes.log)
17
-
include: ./quotes.log
18
-
# Includes the full file path in the log data
19
-
include_file_path: true
20
-
# Excludes the file name from the log data
21
-
include_file_name: false
22
-
# Add custom resource attributes to the log data
23
-
resource:
24
-
# Sets the source of the log data to "quotes.log"
25
-
com.splunk.source: ./quotes.log
26
-
# Sets the sourcetype for the log data to "quotes"
27
-
com.splunk.sourcetype: quotes
14
+
filelog/quotes: # Receiver Type/Name
15
+
include: ./quotes.log # The file to read log data from (quotes.log)
16
+
include_file_path: true # Includes the full file path in the log data
17
+
include_file_name: false # Excludes the file name from the log data
18
+
resource: # Add custom resource attributes to the log data
19
+
com.splunk.source: ./quotes.log # Sets the source of the log data to "quotes.log"
20
+
com.splunk.sourcetype: quotes # Sets the sourcetype for the log data to "quotes"
28
21
```
29
22
30
-
- Add `filelog/quotes` receiver to the `receivers` array in the `logs` section of the pipelines. (make sure it also contains `otlp`)
23
+
- **Add `filelog/quotes` receiver** to the `receivers` array in the `logs` section of the pipelines. (make sure it also contains `otlp`)
0 commit comments