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

Determine if Datadog trace-debug fix needs replacement #610

Open
timmc-edx opened this issue Apr 26, 2024 · 2 comments
Open

Determine if Datadog trace-debug fix needs replacement #610

timmc-edx opened this issue Apr 26, 2024 · 2 comments

Comments

@timmc-edx
Copy link
Member

In #591 we determined that we could fix the Datadog verbose trace logging by setting DD_TRACE_LOG_STREAM_HANDLER=false. It's not clear whether this is a good long-term fix or whether we're using an unstable internal feature that's likely to change out from under us.

Background:

Why the fix may not be stable or appropriate:

  • The flag is not documented, per se, and is only mentioned in the bugfix release notes for version 2.3.0.
  • The flag is described as being useful for when ddtrace-run isn't in effect, but in our case, it is.

Alternatives:

  • Figure out why it's behaving this way in the first place, and fix that. Maybe the Datadog cluster agent's admission controller is setting DD_TRACE_DEBUG somehow?

  • Datadog support suggested calling logging.getLogger("ddtrace").disable() early in the server startup, although this would be a more invasive code change we'd have to propagate to all IDAs:

    This works because ddtrace uses python's standard logging library. Additionally, investigating this makes me suspect that the root cause is ddtrace's logging library inheriting settings from other logging configurations in your code.

@robrap
Copy link
Contributor

robrap commented Jun 20, 2024

Whether we determine on our own, or reopen the support ticket, is there a way to redirect the errors/warnings to another file so that we could set specific retention rules for this in DD, and so that we won't be blind to errors that may matter (and may be ongoing)?

@timmc-edx
Copy link
Member Author

It turns out we can repro this in devstack by running a celery worker. Instructions for setting that up: https://github.com/edx/devstack/blob/master/docs/advanced_configuration.rst#celery-workers

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

No branches or pull requests

2 participants