Skip to content

Unable to send metrics inside docker container #860

@viperfx

Description

@viperfx

Describe the bug
Unable to send metrics inside docker container.

To Reproduce
Steps to reproduce the behavior:

  1. Start a python shell in docker container
  2. Run the code snippet below
  3. Check datadog if the metric is sent.
from datadog import statsd
from datadog import initialize
initialize(statsd_host="localhost",statsd_port=8125)
statsd.increment("my_metric")

Expected behavior
Metric should send as expected.

Run the above steps, but in a local python shell, outside of a docker container. It works as expected.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment and Versions (please complete the following information):

  • Library version: 0.50.1
  • Python version 3.11.10

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugBug related issuestaleStale - Bot reminder

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions