Skip to content

Commit 1a15895

Browse files
committed
add otel install for non-docker
Signed-off-by: chrislai <[email protected]>
1 parent 0356518 commit 1a15895

File tree

1 file changed

+67
-6
lines changed

1 file changed

+67
-6
lines changed

docs/tutorials/agent_tracing/setup_agent_tracing_and_visualization.md

Lines changed: 67 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,75 @@ plugins.ml_commons.agent_tracing_enabled: true
236236

237237
```
238238
239-
### 3. Configuration File Locations
239+
### 3. OpenTelemetry Collector Installation and Setup
240240
241-
For non-Docker setups, you'll need to place configuration files in specific locations:
241+
For non-Docker setups, you need to install and configure the OpenTelemetry Collector:
242+
243+
#### Download and Install OpenTelemetry Collector
244+
```bash
245+
# Download the latest OpenTelemetry Collector
246+
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.131.1/otelcol-contrib_0.131.1_linux_amd64.tar.gz
247+
248+
# Extract the archive
249+
tar -xzf otelcol-contrib_linux_amd64.tar.gz
242250

243-
#### OpenTelemetry Collector Configuration
244-
- **File**: [`otel-collector-config.yaml`](otel-collector-config.yaml)
245-
- **Location**: `/etc/otel-collector-config.yaml` (or your preferred location)
246-
- **Usage**: `otelcol-contrib --config=/path/to/otel-collector-config.yaml`
251+
# Move to system path and make executable
252+
sudo mv otelcol-contrib /usr/local/bin/
253+
sudo chmod +x /usr/local/bin/otelcol-contrib
254+
255+
# Create configuration directory
256+
mkdir -p ~/otel-collector
257+
cd ~/otel-collector
258+
```
259+
260+
#### Create OpenTelemetry Collector Configuration
261+
```bash
262+
cat > otel-collector-config.yaml << 'EOF'
263+
receivers:
264+
otlp:
265+
protocols:
266+
grpc:
267+
endpoint: 0.0.0.0:4317
268+
http:
269+
endpoint: 0.0.0.0:4318
270+
271+
processors:
272+
filter/traces:
273+
spans:
274+
include:
275+
match_type: regexp
276+
attributes:
277+
- key: service.type
278+
value: tracer
279+
batch/traces:
280+
timeout: 5s
281+
send_batch_size: 50
282+
283+
exporters:
284+
debug:
285+
verbosity: detailed
286+
otlp/data-prepper:
287+
endpoint: localhost:21890
288+
tls:
289+
insecure: true
290+
291+
service:
292+
pipelines:
293+
traces:
294+
receivers: [otlp]
295+
processors: [filter/traces, batch/traces]
296+
exporters: [debug, otlp/data-prepper]
297+
EOF
298+
```
299+
300+
#### Run OpenTelemetry Collector
301+
```bash
302+
otelcol-contrib --config=~/otel-collector/otel-collector-config.yaml
303+
```
304+
305+
### 4. Configuration File Locations
306+
307+
For non-Docker setups, you'll need to place configuration files in specific locations:
247308

248309
#### Data Prepper Configuration Files
249310
- **Main Config**: [`data-prepper-config.yaml`](data-prepper-config.yaml)

0 commit comments

Comments
 (0)