-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stress: build our own custom otel collector (#7900)
Build our own custom otel distribution using their official `otb` tool. It reduces the amount of code significantly by cutting it down to azure monitor and removing all other contrib components. As a bonus we can also control the Docker images used, which is helpful for other things.
- Loading branch information
1 parent
2d7823a
commit 05d74aa
Showing
6 changed files
with
55 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# OpenTelemetry custom distro for stress testing | ||
|
||
This `Dockerfile` builds the image we use for our OpenTelemetry collector in the stress testing cluster. | ||
|
||
It includes only the Azure Monitor and 'debug' exporters, which shrinks it down quite a bit and uses only mariner-based images, for both building and for the final app image. | ||
|
||
To test this out locally: | ||
|
||
1. Create a .env file that looks like this: | ||
|
||
```bash | ||
# make sure you bring in the quotes | ||
APPLICATIONINSIGHTS_CONNECTION_STRING='<appinsights connection string from the Azure portal>' | ||
``` | ||
|
||
2. Run ./localtest.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
#!/bin/bash | ||
|
||
docker build -t oteltest . | ||
set -ex | ||
|
||
docker build --no-cache -t oteltest . | ||
|
||
docker run -it \ | ||
-e ENV_FILE=/.env \ | ||
-v `pwd`/.env:/.env \ | ||
-P \ | ||
oteltest | ||
|
16 changes: 16 additions & 0 deletions
16
tools/stress-cluster/services/otelcollector/otel-builder.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This is used as an input to the `ocb` app that lets you build a customized OpenTelemetry collector, | ||
# as described here: https://opentelemetry.io/docs/collector/custom-collector/ | ||
dist: | ||
name: otelcol-custom | ||
description: Local OpenTelemetry Collector binary | ||
output_path: /tmp/dist | ||
otelcol_version: 0.96.0 | ||
exporters: | ||
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuremonitorexporter v0.96.0 | ||
- gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.96.0 | ||
|
||
receivers: | ||
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.0 | ||
|
||
processors: | ||
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.96.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters