Version of orchestrion
Latest - 1.6.1
Describe what happened:
I have the following setup:
- I am creating a docker image for my app via a Dockerfile.
- Inside the image, I am using
serverless-init for my agent, and in there I have set the sampling rules for my service.
- I am using orchestrion too, in order to build my app.
- I have run
orchestrion pin and pushed my go mod and orchestrion.tool.go changes to the repo.
- Inside the code I have added
//dd:spans and they seem to work fine. I am getting the traces.
I checked my gcp server via dd_trace_startup_logs and the env var is truly getting defined correctly based on my env var DD_TRACE_SAMPLING_RULES='[{"service": "notification-processor", "sample_rate": 0.1}]'.
Describe what you expected:
I would expect that the sampling will be respected but it doesn't. I tried also using sampling value of Zero, but I was getting traces. Looking at ingestion-control in DD I can see that my app has the Automatic label.
When I deleted the orchestrion from my docker image, and used the classic dd tracer client in code, finally the ingestion-control changed to Configured Local and traces tagged with the ingestion reason rule, respecting my sampling rule rate.
I would expect that the same would be happening when I use orchestrion tool.
Steps to reproduce the issue:
here is my Dockerfile, so that you have a better view:
# Build stage
FROM golang:1.24.8-alpine AS builder
RUN apk update && \
apk upgrade --no-cache && \
apk add --no-cache ca-certificates && \
update-ca-certificates && \
rm -rf /var/cache/apk/*
#RUN go install github.com/DataDog/orchestrion@v1.6.1
WORKDIR /src
COPY . .
#RUN orchestrion go build -o app cmd/main.go
RUN go build -o app cmd/main.go
# Final stage
FROM alpine:latest
# For Security, Update packages to patch known vulnerabilities in the base image.
# Clean up apt cache to keep the image size down.
RUN apk update && \
apk upgrade --no-cache && \
apk add --no-cache ca-certificates && \
update-ca-certificates
# Copy Go binary
COPY --from=builder /src/app /usr/local/bin/app
# Copy Datadog init
COPY --from=datadog/serverless-init:latest-alpine /datadog-init /usr/local/bin/datadog-init
ENV DD_TRACE_DEBUG=true \
DD_TRACE_SAMPLING_RULES='[{"service": "notification-processor", "sample_rate": 0.1}]'
# Set entrypoint and default command
ENTRYPOINT ["/usr/local/bin/datadog-init"]
CMD ["/usr/local/bin/app"]
EXPOSE 8080
Additional environment details (Version of Go, Operating System, etc.):
go version 1.24.8
personla laptop: macOS
docker on amd64 though
Terraform
Gcp cloud run
Version of orchestrion
Latest - 1.6.1
Describe what happened:
I have the following setup:
serverless-initfor my agent, and in there I have set the sampling rules for my service.orchestrion pinand pushed my go mod andorchestrion.tool.gochanges to the repo.//dd:spans and they seem to work fine. I am getting the traces.I checked my gcp server via
dd_trace_startup_logsand the env var is truly getting defined correctly based on my env varDD_TRACE_SAMPLING_RULES='[{"service": "notification-processor", "sample_rate": 0.1}]'.Describe what you expected:
I would expect that the sampling will be respected but it doesn't. I tried also using sampling value of Zero, but I was getting traces. Looking at
ingestion-controlin DD I can see that my app has theAutomaticlabel.When I deleted the orchestrion from my docker image, and used the classic dd tracer client in code, finally the
ingestion-controlchanged toConfigured Localand traces tagged with the ingestion reasonrule, respecting my sampling rule rate.I would expect that the same would be happening when I use orchestrion tool.
Steps to reproduce the issue:
here is my Dockerfile, so that you have a better view:
Additional environment details (Version of Go, Operating System, etc.):
go version 1.24.8
personla laptop: macOS
docker on amd64 though
Terraform
Gcp cloud run