DataDog / heroku-buildpack-datadog

Heroku Buildpack to run the Datadog Agent in a Dyno
https://www.datadoghq.com/
Apache License 2.0
69 stars 94 forks source link

Feature Request: Service tags for Heroku Postgres databases #370

Open nertzy opened 5 months ago

nertzy commented 5 months ago

Thanks for the DD_ENABLE_HEROKU_POSTGRES, DD_POSTGRES_URL_VAR, and DD_ENABLE_DBM environment variables. With these, I can configure Datadog DBM tracing across a multitude of applications, including DBs that are dynamically provisioned. This is a great feature!

When I'm viewing my databases in the Datadog UI, they show up in a big list, with names like ec2-nnn-nnn-nnn-nnn.compute-1.amazonaws.com (where nnn-nnn-nnn-nnn is the IP address).

It's difficult to tell these DBs apart. It would be great if there were some way to add service tags or some other set of arbitrary key-values pairs to these DB instances. The documentation talks about how to do this via manual configuration, but I don't want to switch to that, as it will require more maintenance, losing the benefit of the env-var-based approach.

For example, if there were some way to tag with #{application_name}-#{db_name} e.g. my-api-staging-GOLD or similar, that would be very helpful.

arapulido commented 1 month ago

Hello @nertzy ! Thanks for the feature request. I have worked on a solution to this, and it is now available in a branch.

Would you be willing to test that branch to see if it works for your use case, please? ara.pulido/db_tags

Documentation is available in the branch as well.