-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Added tracing support #3514
Added tracing support #3514
Conversation
With this we can now load a tracing lib on the start of the app. Implement currently is google cloud tracing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That’s really clever idea! Thanks!
@ResuBaka could you please check the failing CI? |
It looks like not a problem from my changes.
Should I still fix it or should some one else fix it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for tests, was my fault with merge, fixed:)
Although, don't you think it would be better to add this as a new module which can be included in the project, not by config, just by registering it? In develop we have rewritten modules system, @filrak could you take a look? :)
If not extending the modules for server app extensions then this way @ResuBaka proposed is the only way; the only thing is that’s gerrnarijg dependency from core to src but at this stage we do have these dependencies anyway so it’s fine with me |
Another idea is to add traces from the src/server - https://github.com/DivanteLtd/vue-storefront/blob/master/src/server/index.js - which won’t require us to modify core/server; these extensions are being registered only serverside |
I fist had that Idea too but all tracing stuff should happen as early as it gets. So they trace every thing the right way. So with my implementation you can add all tracing frameworks which can be implemented this way be called directly before all other code gets loaded. |
I would use the server module but mine needs to be done before express is started/created so it would still be the best to have it like I have done. Here you have some info. All of them are telling the user to start it as the first module. |
@ResuBaka interesting case, I will move extension point to the beginning |
…eature/add-tracing-lib-support
I would say yes when we don't need typescript support for it or is that done in an other PR? @pkarw |
OK, I've merged it in |
@pkarw |
Related issues
closes #3506
Short description and why it's useful
This adds support to load a tracing library at the start of the app.
I have added an example for google cloud tracing.
You would use it like this.
src/trace/index.js
Screenshots of visual changes before/after (if there are any)
Which environment this relates to
Check your case. In case of any doubts please read about Release Cycle
develop
branch and want to merge it back todevelop
release
branch and want to merge it back torelease
hotfix
ormaster
branch and want to merge it back tohotfix
Upgrade Notes and Changelog
IMPORTANT NOTICE - Remember to update
CHANGELOG.md
with description of your changeContribution and currently important rules acceptance