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

use Date.now and tick offset to calculate span time #899

Merged
merged 2 commits into from
Mar 27, 2021

Conversation

ngraef
Copy link
Contributor

@ngraef ngraef commented Mar 26, 2021

📝 Description

Fixes span timing inconsistencies across modules by using Date.now() for startTime and perf_hooks to measure duration.

🎯 Relevant issues

Fixes #897

💎 Type of change

  • Bug fix (non-breaking change which fixes an issue)

🚦 How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit tests
  • Integration tests
  • Tested with 5 distributed services sending to Datadog

🏁 Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have commented my code, particularly in hard-to-understand areas

Copy link
Member

@icebob icebob left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job. Please remove the unused now.js" module.

@icebob icebob merged commit 0f5edc6 into moleculerjs:master Mar 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trace spans have inconsistent timing
3 participants