Skip to content

Commit

Permalink
Merge pull request #29 from winds-mobi/feature/dependencies
Browse files Browse the repository at this point in the history
Upgrade dependencies
  • Loading branch information
ysavary authored Mar 26, 2023
2 parents 5702938 + b038e5a commit ac9d8fc
Show file tree
Hide file tree
Showing 5 changed files with 1,840 additions and 1,643 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.0-slim-bullseye AS base
FROM python:3.11.2-slim-bullseye AS base

ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
Expand All @@ -10,7 +10,7 @@ FROM base AS python

RUN apt update; \
apt --yes --no-install-recommends install build-essential curl
RUN curl -sSL https://install.python-poetry.org | python - --version 1.2.0
RUN curl -sSL https://install.python-poetry.org | python - --version 1.4.1

COPY . .
RUN POETRY_VIRTUALENVS_IN_PROJECT=true /root/.local/bin/poetry install --without dev
Expand Down
6 changes: 4 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ services:
- winds-mobi-providers

opentelemetry-collector:
image: otel/opentelemetry-collector-contrib
image: otel/opentelemetry-collector-contrib:0.74.0
profiles:
- application
ports:
- "8002:4317"
volumes:
- ./opentelemetry/collector.yaml:/config.yaml
environment:
DATADOG_API_KEY: ${DATADOG_API_KEY}
ENVIRONMENT: local
SENTRY_URL: ${SENTRY_URL}
UPTRACE_URL: ${UPTRACE_URL}
command: "--config /config.yaml"

networks:
Expand Down
42 changes: 33 additions & 9 deletions opentelemetry/collector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,45 @@ receivers:
grpc:

processors:
attributes/environment:
actions:
- key: deployment.environment
action: insert
value: ${ENVIRONMENT}
tail_sampling:
decision_wait: 10s
num_traces: 10000
expected_new_traces_per_sec: 10
policies:
[
{
name: errors-policy,
type: status_code,
status_code: { status_codes: [ ERROR ] },
},
{
name: randomized-policy,
type: probabilistic,
probabilistic: { sampling_percentage: 0.1 },
},
]
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
send_batch_size: 10000
timeout: 10s

exporters:
datadog:
api:
site: datadoghq.eu
key: ${DATADOG_API_KEY}
sentry:
dsn: ${SENTRY_URL}
environment: ${ENVIRONMENT}
insecure_skip_verify: true
otlp/uptrace:
endpoint: otlp.uptrace.dev:4317
headers:
uptrace-dsn: ${UPTRACE_URL}

service:
pipelines:
traces:
receivers: [ otlp ]
exporters: [ datadog ]
processors: [ batch ]
processors: [ attributes/environment, tail_sampling, batch ]
exporters: [ sentry, otlp/uptrace ]
Loading

0 comments on commit ac9d8fc

Please sign in to comment.