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] Newly introduced database/sql metrics do not send over Unix sockets #2677

Open
jared-mackey opened this issue Apr 30, 2024 · 3 comments
Assignees
Labels
bug unintended behavior that has to be fixed

Comments

@jared-mackey
Copy link

Version of dd-trace-go
1.63.0

Describe what happened:

#2303 (comment)

Describe what you expected:
New metrics to work over Unix sockets

Steps to reproduce the issue:

#2303 (comment)

cc @mtoffl01

@jared-mackey jared-mackey added the bug unintended behavior that has to be fixed label Apr 30, 2024
@github-actions github-actions bot added the needs-triage New issues that have not yet been triaged label Apr 30, 2024
@darccio darccio removed the needs-triage New issues that have not yet been triaged label Apr 30, 2024
@mtoffl01
Copy link
Contributor

mtoffl01 commented May 2, 2024

Hey @jared-mackey ,

It does not read or use DD_DOGSTATSD_URL like I would expect it to.

DD_DOGSTATSD_URL is not a valid config option for dd-trace-go (Note: Confusingly, it is valid for other Datadog tracers such as dd-trace-py). See here: https://docs.datadoghq.com/tracing/trace_collection/library_config/go, only DD_DOGSTATSD_PORT is available for configuration via env var.
To have total control over the dogstatsd address, you'd need the tracer config option WithDogstatsdAddress.

Regardless of the env var's significance to the tracer, it should still work if you pass that env var as a value to the tracer start option, like in your example tracer.WithDogstatsdAddress(os.Getenv("DD_DOGSTATSD_URL")). A few questions:

  1. When you use just the DD_DOGSTATSD_URL env var, can you confirm whether you receive any runtime metrics or tracer health metrics (these should be prefixed with datadog.tracer, entries like datadog.tracer.started and datadog.tracer.spans_started). With this config, I'd guess you're missing all dogstatsd payloads from the tracer, not just db stats
  2. Can you confirm the tracer.WithDogstatsdAddress option does not work? What is the behavior you're seeing in the logs for this specific case? I could not reproduce this on my side.

@jared-mackey
Copy link
Author

Hi @mtoffl01,

So this is confusing then. Because I am getting runtime metrics currently with only that env var configured. I do not currently call tracer.WithDogstatsdAddress. I do however setup a Dogstatsd client. I do not provide it a URL but it instead uses the env var. You can see that here. Is the tracer somehow using that client for runtime metrics but not for the sql metrics?

I’d be happy to share exact code samples over a support ticket if that’s helpful. Just let me know.

@mtoffl01
Copy link
Contributor

mtoffl01 commented May 8, 2024

@jared-mackey ,

I’d be happy to share exact code samples over a support ticket if that’s helpful. Just let me know.

Please do! When you open the support ticket, please be sure to link to this github issue so that the support rep who takes the case will have the necessary context, and bubble it up to us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unintended behavior that has to be fixed
Projects
None yet
Development

No branches or pull requests

3 participants