Skip to content

Commit cab31dd

Browse files
committed
chore(docs): Update Parse Multiline Logs doc
1 parent a4a999c commit cab31dd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

data/docs/userguide/parse-multiline-logs.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This guide shows two ways to recombine multiline logs in OpenTelemetry Collector
1919

2020
Here is an example of multiline logs
2121

22-
```python
22+
```text
2323
2024-20-06 18:58:05,898 ERROR:Exception on main handler
2424
Traceback (most recent call last):
2525
File "python-logger.py", line 9, in make_log
@@ -28,7 +28,7 @@ IndexError: string index out of range
2828
2024-20-06 18:58:05,898 DEBUG:Query Started
2929
```
3030

31-
In the above example there there are two log lines spread over multiple line, but since by default each newline is treated as end of log line, multiple log lines will be created as seen in the image below.
31+
The example above has two log entries spread over multiple lines. Since each newline is treated as the end of a log entry by default, the collector creates separate entries for each line:
3232

3333
<figure data-zoomable align="center">
3434
<img src="/img/logs/multiline/multiline_broken.png" alt="Multiline logs broken" />
@@ -39,13 +39,13 @@ In the above example there there are two log lines spread over multiple line, bu
3939

4040
## Parse Multiline Logs at Receiver
4141

42-
The [filelog receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/filelogreceiver/README.md) has a built-in `multiline` configuration block. This is the recommended approach because it recombines logs before they enter the pipeline.
42+
The <a href="https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/filelogreceiver/README.md" target="_blank" rel="noopener noreferrer nofollow">filelog receiver</a> has a built-in `multiline` configuration block. This is the recommended approach because it recombines logs before they enter the pipeline.
4343

4444
### Step 1: Identify the start or end pattern
4545

4646
Look at your log format and find a regex that matches the beginning (or end) of each log entry.
4747

48-
```python
48+
```text
4949
2024-20-06 18:58:05,898 ERROR:Exception on main handler
5050
Traceback (most recent call last):
5151
File "python-logger.py", line 9, in make_log
@@ -102,7 +102,7 @@ After deployment, the logs will appear as single entries in SigNoz:
102102

103103
### Using multiline in the SigNoz k8s-infra Helm chart
104104

105-
If you are running SigNoz on Kubernetes with the [k8s-infra Helm chart](https://github.com/SigNoz/charts/tree/main/charts/k8s-infra), use the `presets.logsCollection.multiline` key in your Helm values instead of editing the raw receiver config:
105+
If you are running SigNoz on Kubernetes with the <a href="https://github.com/SigNoz/charts/tree/main/charts/k8s-infra" target="_blank" rel="noopener noreferrer nofollow">k8s-infra Helm chart</a>, use the `presets.logsCollection.multiline` key in your Helm values instead of editing the raw receiver config:
106106

107107
```yaml
108108
presets:
@@ -115,7 +115,7 @@ The preset propagates this directly to the `filelog` receiver's `multiline` bloc
115115

116116
## Use Recombine Operator to Combine Multiline Logs
117117

118-
If you cannot use the receiver-level multiline configuration, you can use the [recombine](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/recombine.md) operator inside a `logstransform` processor.
118+
If you cannot use the receiver-level multiline configuration, you can use the <a href="https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/stanza/docs/operators/recombine.md" target="_blank" rel="noopener noreferrer nofollow">recombine</a> operator inside a `logstransform` processor.
119119

120120
<Admonition type="warning">
121121
The `logstransform` processor has development stability and is **not included in the official
@@ -128,7 +128,7 @@ If you cannot use the receiver-level multiline configuration, you can use the [r
128128

129129
Using the same example logs:
130130

131-
```python
131+
```text
132132
2024-20-06 18:58:05,898 ERROR:Exception on main handler
133133
Traceback (most recent call last):
134134
File "python-logger.py", line 9, in make_log

0 commit comments

Comments
 (0)