Skip to content

Preserve microsecond precision#175

Merged
ybasket merged 23 commits intomasterfrom
fix/preserve-time-precision
Jul 19, 2023
Merged

Preserve microsecond precision#175
ybasket merged 23 commits intomasterfrom
fix/preserve-time-precision

Conversation

@ybasket
Copy link
Copy Markdown
Contributor

@ybasket ybasket commented Jun 19, 2023

As cats-effect 3.4+ offers more time precision than just milliseconds, this now fixes the conversion to preserve microseconds on span start and duration.

As cats-effect 3.4+ offers more time precision than just milliseconds, this now fixes the conversion to preserve microseconds on span start and duration.
Comment thread project/Dependencies.scala Outdated
ybasket pushed a commit to trace4cats/trace4cats that referenced this pull request Jul 18, 2023
By having an uncancelable fiber via background and discarding the reference to it, the shut down wasn't awaiting the sending process to finish, causing spans to be lost. This bug probably got amplified in newer CE versions with improved performance, it manifested regularly in the Jaeger-based tests, see trace4cats/trace4cats-jaeger#175.

I tried adding a test case that would reproduce the issue, but failed as it seems to require real concurrency with thread switches that are hard to set up in a simple test case where as they come naturally from network I/O in integration tests.
@ybasket ybasket merged commit e834750 into master Jul 19, 2023
@mergify mergify bot deleted the fix/preserve-time-precision branch July 19, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant