Created
November 30, 2022 10:02
-
-
Save larskarbo/94850fb4205a2fbc623a3c691b41ca90 to your computer and use it in GitHub Desktop.
OpenTelemetry Collector Satelite with Dockerfile
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
FROM alpine:latest | |
RUN apk --no-cache add curl | |
COPY ./otel-config.yaml /etc/otel/config.yaml | |
RUN curl -L https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.66.0/otelcol-contrib_0.66.0_linux_amd64.tar.gz -o otelcol-contrib.tar.gz | |
RUN tar -xf otelcol-contrib.tar.gz otelcol-contrib | |
EXPOSE 4318 | |
RUN ["chmod", "+x", "/otelcol-contrib"] | |
ENTRYPOINT ["/otelcol-contrib", "--config", "/etc/otel/config.yaml"] |
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
receivers: | |
otlp: | |
protocols: | |
http: | |
# The prometheus receiver scrapes metrics needed for the OpenTelemetry Collector Dashboard. | |
prometheus: | |
config: | |
scrape_configs: | |
- job_name: "otelcol" | |
scrape_interval: 10s | |
static_configs: | |
- targets: ["0.0.0.0:8888"] | |
processors: | |
batch: | |
# Datadog APM Intake limit is 3.2MB. Let's make sure the batches do not | |
# go over that. | |
send_batch_max_size: 1000 | |
send_batch_size: 100 | |
timeout: 10s | |
exporters: | |
logging: | |
logLevel: debug | |
datadog: | |
api: | |
site: datadoghq.com | |
key: ${DATADOG_API_KEY} | |
service: | |
pipelines: | |
metrics: | |
receivers: [otlp] | |
processors: [batch] | |
exporters: [datadog] | |
traces: | |
receivers: [otlp] | |
processors: [batch] | |
exporters: [logging, datadog] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment