Skip to content

Commit 50af4dd

Browse files
committed
inital fixes for sum section
1 parent f985d85 commit 50af4dd

File tree

2 files changed

+48
-12
lines changed

2 files changed

+48
-12
lines changed

content/en/ninja-workshops/3-opentelemetry-collector-workshops/2-advanced-collector/9-sum-count/9-2-sum.md

Lines changed: 47 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Create metrics with Sum Connector
33
linkTitle: 9.2 Sum Connector
44
time: 10 minutes
5-
weight: 9
5+
weight: 2
66
---
77

88
In this section, we will explore how we can use the [**Sum Connector**](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/connector/sumconnector) to retrieve values from the spans and turn them in to metrics.
@@ -26,19 +26,55 @@ Include the Sum Connector in the connectors section of your configuration and de
2626
- key: user.name
2727
```
2828
29-
TBD
30-
31-
- **Explanation of the Metrics Counters**
32-
33-
- `logs.full.count`: Tracks the total number of logs processed during each interval
34-
- `logs.sw.count` Counts logs that contain a quote from a Star Wars movie.
35-
- `logs.lotr.count`: Counts logs that contain a quote from a Lord of the Rings movie.
36-
- `logs.error.count`: Represents a real-world scenario by counting logs with a severity level of ERROR.
29+
```yaml
30+
pipelines:
31+
traces:
32+
receivers:
33+
- otlp
34+
processors:
35+
- memory_limiter
36+
- attributes/update # Update, hash, and remove attributes
37+
- redaction/redact # Redact sensitive fields using regex
38+
- resourcedetection
39+
- resource/add_mode
40+
- batch
41+
exporters:
42+
- debug
43+
- file
44+
- otlphttp
45+
metrics:
46+
receivers:
47+
- count
48+
- sum
49+
- otlp
50+
#- hostmetrics # Host Metrics Receiver
51+
processors:
52+
- memory_limiter
53+
- resourcedetection
54+
- resource/add_mode
55+
- batch
56+
exporters:
57+
- debug
58+
- otlphttp
59+
logs:
60+
receivers:
61+
- otlp
62+
- filelog/quotes
63+
processors:
64+
- memory_limiter
65+
- resourcedetection
66+
- resource/add_mode
67+
- transform/logs # Transform logs processor
68+
- batch
69+
exporters:
70+
- count
71+
- sum
72+
- debug
73+
- otlphttp
74+
```
3775
3876
{{% /notice %}}
3977
40-
We count logs based on their attributes. If your log data is stored in the log body instead of attributes, you’ll need to use a Transform processor in your pipeline to extract key/value pairs and add them as attributes.
41-
4278
In this workshop, we’ve already included `merge_maps(attributes, cache, "upsert")` in the Transform section. This ensures that all relevant data is available in the log attributes for processing.
4379

4480
{{% notice title="Exercise" style="green" icon="running" %}}

content/en/ninja-workshops/3-opentelemetry-collector-workshops/2-advanced-collector/9-sum-count/9-3-sum-test.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 9.3 Testing the Count Connector
33
linkTitle: 9.3 Test Sum Connector
4-
weight: 1
4+
weight: 3
55
---
66

77
{{% notice title="Exercise" style="green" icon="running" %}}

0 commit comments

Comments
 (0)