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

tracer: Flush doesn't flush stats #1547

Closed
katiehockman opened this issue Oct 27, 2022 · 0 comments · Fixed by #1661
Closed

tracer: Flush doesn't flush stats #1547

katiehockman opened this issue Oct 27, 2022 · 0 comments · Fixed by #1661
Labels
bug unintended behavior that has to be fixed low-hanging Tasks that are quick and/or easy.

Comments

@katiehockman
Copy link
Contributor

See DataDog/system-tests#596 for more context.

It appears that Flush() will flush some data, but won't flush stats. This is causing issues in the parametric tests. We should investigate if there's a good reason for this on the Go tracer side, or if this is just a bug.

@katiehockman katiehockman added the bug unintended behavior that has to be fixed label Oct 27, 2022
@katiehockman katiehockman added the low-hanging Tasks that are quick and/or easy. label Jan 11, 2023
lievan added a commit that referenced this issue Jan 13, 2023
Flush() flushed buffered traces, but it did not flush stats. We enabled flushing stats by adding a flush method to the statsdClient interface and calling that method when trace flushing occurred.

Fixes #1547
lievan added a commit that referenced this issue Jan 19, 2023
* ddtrace/tracer: enable stats flushing when Flush() is called

Flush() flushed buffered traces, but it did not flush stats. We enabled flushing stats by adding a flush method to the statsdClient interface and calling that method when trace flushing occurred.

Fixes #1547

* ddtrace/tracer: add unit test for flushing stats

Altered TestFlush to verify that flushSync() flushes stats

* ddtrace/tracer: changed add-assign to increment operator

* ddtrace/tracer: added flushing for stats concentrator and test for flushing stats concentrator

* Change assert from Equal to Zero

Co-authored-by: Katie Hockman <katie@hockman.dev>

* Change bucketSize of concentrator in TestFlush to defaultStatsBucketSize

Co-authored-by: Katie Hockman <katie@hockman.dev>

* changed start time for span in TestFlush to use defaultStatsBucketSize

* Fixed flipped assertion for statsdclient flush unit test

Co-authored-by: Andrew Glaude <andrew.glaude@datadoghq.com>

* flush current bucket on call to flushAndSend

Co-authored-by: Katie Hockman <katie@hockman.dev>
Co-authored-by: Andrew Glaude <andrew.glaude@datadoghq.com>
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 low-hanging Tasks that are quick and/or easy.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant