How to use datadog in .NET 4.6.2 application?

127 Views Asked by At

I'm trying to use datadog in a .NET 4.6.2 application, but without success in obtaining the trace of my application.

I created the implementation in the application's docker-compose. Containers are detected in the datadog panel, I pointed my application to the datadog container but nothing happens, the application trace does not appear at all.

I tried installing the datadog.trace.bundle nuget, but it makes Visual Studio break.

This is in docker compose:

datadog-agent:
  image: "public.ecr.aws/datadog/agent:latest"
  ports:
    - "8126:8126"
  networks:
    - localnet
  environment:
    - DD_API_KEY=918552fb01dd7a1bbf7c0eba8b3ffbe1
    - DD_SITE=us5.datadoghq.com
    - DD_ENV=dev
    - DD_APM_ENABLED=true
    - DD_APM_NON_LOCAL_TRAFFIC=true
    - DD_RUNTIME_METRICS_ENABLED=true
    - DD_DOGSTATSD_NON_LOCAL_TRAFFIC=true
    - DD_APM_RECEIVER_SOCKET=/opt/datadog/apm/inject/run/apm.socket
    - DD_DOGSTATSD_SOCKET=/opt/datadog/apm/inject/run/dsd.socket
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - /proc/:/host/proc/:ro
    - /sys/fs/cgroup/:/host/sys/fs/cgroup:ro

This is in my local application app.config:

<add key="DD_TRACE_AGENT_URL" value="http://datadog-agent:8126"/>
<add key="DD_SERVICE" value="My_Application"/>
<add key="DD_ENV" value="dev"/>
<add key="DD_VERSION" value="1.1.0"/>

I expected the bundle to work to send the trace to datadog, but it's not happening.

0

There are 0 best solutions below