Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] OTLP Logs in serverless-init do not work #34097

Open
cfstras opened this issue Feb 17, 2025 · 0 comments
Open

[BUG] OTLP Logs in serverless-init do not work #34097

cfstras opened this issue Feb 17, 2025 · 0 comments

Comments

@cfstras
Copy link

cfstras commented Feb 17, 2025

Agent Environment
Docker, serverless-init, 1.5.6

Describe what happened:

I'm trying to run a service on Google Cloud Run, with metrics, traces, and logs all going through OTLP to datadog via serverless-init.

However, when enabling OTLP logs, the agent fails to start up and no OTLP port is opened at all (connection refused to 0.0.0.0:4317).

2025-02-17 13:43:39 UTC | SERVERLESS_INIT | DEBUG | Launching subprocess [dotnet my-app.dll]
2025-02-17 13:43:39 UTC | SERVERLESS_INIT | ERROR | Error running the OTLP pipeline: invalid configuration: service::pipelines config validation failed: pipeline "logs": must have at least one receiver

Describe what you expected:

I expected the OTLP receiver to start and accept logs.
This is so that I can use any framework's native OTLP logging exporters, rather than having to mess with log forwarding via GCP dataflow, or manual JSON exporters and parsing in the agent.

Steps to reproduce the issue:

... compile my app

FROM base AS final
WORKDOR app
COPY --from=publish /app/publish .
COPY --from=datadog/serverless-init:1.5.6 / /app/

ENV DD_SITE=datadoghq.eu
ENV DD_SERVICE=notifications-api
ENV DD_ENV=unknown
ENV DD_VERSION=unknown
ENV DD_LOGS_ENABLED=true
ENV DD_APM_ENABLED=true
ENV DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_GRPC_ENDPOINT=0.0.0.0:4317
ENV DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_HTTP_ENDPOINT=0.0.0.0:4318
ENV DD_OTLP_CONFIG_LOGS_ENABLED=true
ENV DD_OTLP_CONFIG_TRACES_ENABLED=true
ENV DD_OTLP_CONFIG_METRICS_ENABLED=true

ENV DD_OTLP_CONFIG_DEBUG_VERBOSITY=detailed
ENV DD_OTLP_CONFIG_TRACES_ENABLED=true

ENV DD_LOG_LEVEL=debug

ENTRYPOINT ["/app/datadog-init", "dotnet", "my-app.dll"]
docker build -t test -f my-app/Dockerfile . && \
docker run -it --rm --name test \
    -p 8080:8080 \
    -e DD_API_KEY=<snip> -e DD_ENV=local \
    test

Additional environment details (Operating System, Cloud provider, etc):

Reproducible running locally in docker.

I've traced the code down to comp/otelcol/otlp/map_provider_config_serverless.go, which seems like it's just misconfiguring the OTLP receiver in serverless build mode?

const defaultLogsConfig string = ``

Any help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant