Skip to content

Commit 9dcbe7f

Browse files
2 parents c08c1e4 + 7596bcf commit 9dcbe7f

File tree

187 files changed

+4141
-2686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

187 files changed

+4141
-2686
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 5.76
2+
current_version = 5.80
33
commit = True
44
Tag = True
55
parse = v?(?P<major>\d+)\.(?P<minor>\d+)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ Unless required by applicable law or agreed to in writing, software distributed
2323
To get started, please proceed to [The Splunk Observability Cloud Workshops Homepage](https://splunk.github.io/observability-workshop/latest/).
2424

2525
Latest versions of the workshop are:
26-
- [v5.76](https://splunk.github.io/observability-workshop/v5.76/)
27-
- [v5.75](https://splunk.github.io/observability-workshop/v5.75/)
26+
- [v5.80](https://splunk.github.io/observability-workshop/v5.80/)
27+
- [v5.79](https://splunk.github.io/observability-workshop/v5.79/)

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.76
1+
5.80

assets/css/theme-splunk-light.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
--CODE-INLINE-BG-color: rgba( 255, 250, 233, 1 ); /* background color of inline code */
1616
--CODE-INLINE-BORDER-color: rgba( 248, 232, 200, 1 ); /* border color of inline code */
1717
--BROWSER-theme: light; /* name of the theme for browser scrollbars of the main section */
18-
--MERMAID-theme: default; /* name of the default Mermaid theme for this variant, can be overridden in hugo.toml */
18+
--MERMAID-theme: dark; /* name of the default Mermaid theme for this variant, can be overridden in hugo.toml */
1919
--OPENAPI-theme: light; /* name of the default OpenAPI theme for this variant, can be overridden in hugo.toml */
2020
--OPENAPI-CODE-theme: idea; /* name of the default OpenAPI code theme for this variant, can be overridden in hugo.toml */
2121
--MENU-HEADER-BORDER-color: rgba( 0, 0, 0, 1); /* border color of the menu header */
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: 1.1 Agent Configuration
3+
linkTitle: 1.1 Agent Configuration
4+
weight: 1
5+
---
6+
Let's walk through a few modifications to our agent configuration to get things started:
7+
8+
{{% notice title="Exercise" style="green" icon="running" %}}
9+
10+
**Add an `otlp` receiver**: The [**OTLP receiver**](https://docs.splunk.com/observability/en/gdi/opentelemetry/components/otlp-receiver.html) will listen for incoming telemetry data over HTTP (or gRPC).
11+
12+
```yaml
13+
otlp: # Receiver Type
14+
protocols: # list of Protocols used
15+
http: # This wil enable the HTTP Protocol
16+
endpoint: "0.0.0.0:4318" # Endpoint for incoming telemetry data
17+
```
18+
19+
**Add a `debug` exporter**: The [**Debug exporter**](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/debugexporter/README.md) will output detailed debug information for every telemetry record.
20+
21+
```yaml
22+
debug: # Exporter Type
23+
verbosity: detailed # Enabled detailed debug output
24+
```
25+
26+
**Update Pipelines**: Ensure that the `otlp` receiver, `memory_limiter` processor, and `debug` exporter are added to the pipelines for `traces`, `metrics`, and `logs`. You can choose to use the format below or use array brackets `[memory_limiter]`:
27+
28+
```yaml
29+
traces:
30+
receivers:
31+
- otlp # OTLP Receiver
32+
processors:
33+
- memory_limiter # Memory Limiter Processor
34+
exporters:
35+
- debug # Debug Exporter
36+
```
37+
38+
{{% /notice %}}
39+
40+
{{% notice title="Usage" style="primary" icon="lightbulb" %}}
41+
During this workshop, we will use **[otelbin.io](https://www.otelbin.io/)** to quickly validate YAML syntax and ensure OpenTelemetry configurations are correct. This helps prevent errors before running tests during this workshop.
42+
43+
To validate your configuration:
44+
45+
1. Open **[otelbin.io](https://www.otelbin.io/)** and replace the existing configuration by pasting your own YAML into the left pane.
46+
2. At the top of the page, ensure that **Splunk OpenTelemetry Collector** is selected as the validation target.
47+
3. Once validated, refer to the image representation below to verify if your pipelines are correctly set up.
48+
49+
In most cases, we will display only the key pipeline. However, if all three pipelines (**Traces**, **Metrics**, and **Logs**) share the same structure, we will indicate this instead of displaying each one separately.
50+
51+
{{% /notice %}}
52+
53+
```mermaid
54+
%%{init:{"fontFamily":"monospace"}}%%
55+
graph LR
56+
%% Nodes
57+
REC1(&nbsp;&nbsp;otlp&nbsp;&nbsp;<br>fa:fa-download):::receiver
58+
PRO1(memory_limiter<br>fa:fa-microchip):::processor
59+
EXP1(&ensp;debug&ensp;<br>fa:fa-upload):::exporter
60+
%% Links
61+
subID1:::sub-traces
62+
subgraph " "
63+
subgraph subID1[**Traces/Metrics/Logs**]
64+
direction LR
65+
REC1 --> PRO1
66+
PRO1 --> EXP1
67+
end
68+
end
69+
classDef receiver,exporter fill:#8b5cf6,stroke:#333,stroke-width:1px,color:#fff;
70+
classDef processor fill:#6366f1,stroke:#333,stroke-width:1px,color:#fff;
71+
classDef con-receive,con-export fill:#45c175,stroke:#333,stroke-width:1px,color:#fff;
72+
classDef sub-traces stroke:#fff,stroke-width:1px, color:#fff,stroke-dasharray: 3 3;
73+
```
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
---
2+
title: 1.2 Test Agent Configuration
3+
linkTitle: 1.2 Test Agent Configuration
4+
weight: 2
5+
---
6+
7+
Once you've updated the configuration, you’re ready to proceed to running the OpenTelemetry Collector with your new setup. This exercise sets the foundation for understanding how data flows through the OpenTelemetry Collector.
8+
9+
{{% notice title="Exercise" style="green" icon="running" %}}
10+
11+
**Find your Agent terminal window**:
12+
13+
1. Change into the `[WORKSHOP]/1-agent` folder
14+
2. Run the following command:
15+
16+
```sh { title="Agent" }
17+
../otelcol --config=agent.yaml
18+
```
19+
20+
In this workshop, we use **macOS/Linux** commands by default. If you’re using Windows, adjust the commands as needed i.e. use `./otelcol.exe`.
21+
22+
{{% /notice %}}
23+
24+
> [!note]
25+
> On Windows, a dialog box may appear asking if you want to grant public and private network access to `otelcol.exe`. Click **"Allow"** to proceed.
26+
27+
{{% notice title="Exercise" style="green" icon="running" %}}
28+
29+
**Verify debug output**: If everything is set up correctly, the first and last lines of the output should display:
30+
31+
```text
32+
2025/01/13T12:43:51 settings.go:478: Set config to [agent.yaml]
33+
<snip to the end>
34+
2025-01-13T12:43:51.747+0100 info [email protected]/service.go:261 Everything is ready. Begin running and processing data.
35+
```
36+
37+
**Create a test span file**:
38+
Instead of instrumenting an application, we will simulate sending trace data to the OpenTelemetry Collector using `cURL`. The trace data, formatted in JSON, represents what an instrumentation library would typically generate and send.
39+
40+
1. Find your **Tests** Terminal window and change into the `[WORKSHOP]/1-agent` directory.
41+
2. Copy and paste the following **span** data into a new file named `trace.json`:
42+
43+
This file will allow us to test how the OpenTelemetry Collector processes and send **spans** that are part of a trace, without requiring actual application instrumentation.
44+
45+
{{% tabs %}}
46+
{{% tab title="trace.json" %}}
47+
48+
```json
49+
{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"my.service"}},{"key":"deployment.environment","value":{"stringValue":"my.environment"}}]},"scopeSpans":[{"scope":{"name":"my.library","version":"1.0.0","attributes":[{"key":"my.scope.attribute","value":{"stringValue":"some scope attribute"}}]},"spans":[{"traceId":"5B8EFFF798038103D269B633813FC60C","spanId":"EEE19B7EC3C1B174","parentSpanId":"EEE19B7EC3C1B173","name":"I'm a server span","startTimeUnixNano":"1544712660000000000","endTimeUnixNano":"1544712661000000000","kind":2,"attributes":[{"key":"user.name","value":{"stringValue":"George Lucas"}},{"key":"user.phone_number","value":{"stringValue":"+1555-867-5309"}},{"key":"user.email","value":{"stringValue":"[email protected]"}},{"key":"user.account_password","value":{"stringValue":"LOTR>StarWars1-2-3"}},{"key":"user.visa","value":{"stringValue":"4111 1111 1111 1111"}},{"key":"user.amex","value":{"stringValue":"3782 822463 10005"}},{"key":"user.mastercard","value":{"stringValue":"5555 5555 5555 4444"}}]}]}]}]}
50+
```
51+
52+
{{% /tab %}}
53+
{{% /tabs %}}
54+
55+
```text { title="Updated Directory Structure" }
56+
[WORKSHOP]
57+
├── 1-agent # Module directory
58+
│   └── agent.yaml # OpenTelemetry Collector configuration file
59+
│   └── trace.json # Sample trace data
60+
└── otelcol # OpenTelemetry Collector binary
61+
```
62+
63+
**Send a test span**: Run the following command to send a **span** to the agent:
64+
65+
{{% tabs %}}
66+
{{% tab title="cURL Command" %}}
67+
68+
```sh
69+
curl -X POST -i http://localhost:4318/v1/traces -H "Content-Type: application/json" -d "@trace.json"
70+
```
71+
72+
{{% /tab %}}
73+
{{% tab title="cURL Response" %}}
74+
75+
```text
76+
HTTP/1.1 200 OK
77+
Content-Type: application/json
78+
Date: Mon, 27 Jan 2025 09:51:02 GMT
79+
Content-Length: 21
80+
81+
{"partialSuccess":{}}%
82+
```
83+
84+
{{% /tab %}}
85+
{{% /tabs %}}
86+
87+
{{% notice info %}}
88+
89+
1. `HTTP/1.1 200 OK`: Confirms the request was processed successfully.
90+
2. `{"partialSuccess":{}}`: Indicates 100% success, as the field is empty. In case of a partial failure, this field will include details about any failed parts.
91+
92+
{{% /notice %}}
93+
{{% /notice %}}
94+
95+
{{% notice note %}}
96+
On Windows, you may encounter the following error:
97+
{{% textcolor color="red" weight="bold" %}}Invoke-WebRequest : Cannot bind parameter 'Headers'. Cannot convert the "Content-Type: application/json" ...{{% /textcolor %}}
98+
To resolve this, use `curl.exe` instead of just `curl`.
99+
{{% /notice %}}
100+
101+
{{% notice title="Exercise" style="green" icon="running" %}}
102+
103+
**Verify Debug Output**:
104+
105+
1. Find the **Agent** terminal window and check the collector's debug output. You should see the Debug entries related to the span you just sent.
106+
2. We are showing the first and last lines of the debug log for that span. To get the full context, Use the **Complete Debug Output** Button to review.
107+
108+
```text
109+
2025-02-03T12:46:25.675+0100 info ResourceSpans #0
110+
<snip>
111+
{"kind": "exporter", "data_type": "traces", "name": "debug"}
112+
```
113+
114+
{{% expand title="{{% badge style=primary icon=scroll %}}Complete Debug Output{{% /badge %}}" %}}
115+
116+
```text
117+
2025-02-03T12:46:25.675+0100 info ResourceSpans #0
118+
Resource SchemaURL:
119+
Resource attributes:
120+
-> service.name: Str(my.service)
121+
-> deployment.environment: Str(my.environment)
122+
ScopeSpans #0
123+
ScopeSpans SchemaURL:
124+
InstrumentationScope my.library 1.0.0
125+
InstrumentationScope attributes:
126+
-> my.scope.attribute: Str(some scope attribute)
127+
Span #0
128+
Trace ID : 5b8efff798038103d269b633813fc60c
129+
Parent ID : eee19b7ec3c1b173
130+
ID : eee19b7ec3c1b174
131+
Name : I'm a server span
132+
Kind : Server
133+
Start time : 2018-12-13 14:51:00 +0000 UTC
134+
End time : 2018-12-13 14:51:01 +0000 UTC
135+
Status code : Unset
136+
Status message :
137+
Attributes:
138+
-> user.name: Str(George Lucas)
139+
-> user.phone_number: Str(+1555-867-5309)
140+
-> user.email: Str([email protected])
141+
-> user.account_password: Str(LOTR>StarWars1-2-3)
142+
-> user.visa: Str(4111 1111 1111 1111)
143+
-> user.amex: Str(3782 822463 10005)
144+
-> user.mastercard: Str(5555 5555 5555 4444)
145+
{"kind": "exporter", "data_type": "traces", "name": "debug"}
146+
```
147+
148+
{{% /expand %}}
149+
150+
{{% /notice %}}

0 commit comments

Comments
 (0)