-
Notifications
You must be signed in to change notification settings - Fork 26
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
Set ProfilingId from Profiler? #39
Comments
Considering this issue: I think there should be no way for the profiler (saver) to specify _id, i.e every submit should be accepted as new profiling submit. |
Unit tests in xhgui assume the
|
Allow id-override in pdo saver: similarly in mongo saver: but the override is there just to allow testing, at least for pdo. |
It would be simpler if the clients didn't generate ids. That would allow the server and each storage implementation to generate the appropriate ID as required. It also prevents duplicate IDs from being created. |
thanks, @markstory I've come to the same conclusion, just haven't got around to implementing it so. |
also, the import method should return the id in the response: |
ignoring Id from saver if one is provided: |
Providing id from profiler is no longer supported with latest xhgui (it's ignored). |
The getLastProfilingId() was added in: it was a mistake and is removed by now. a better approach, if need to identify requests and profilers, is to use UNIQUE_ID in env: |
In mongo saver there's getLastProfilingId method:
that has a side-effect, that if this saver is called in the application side, the id would be re-used for multiple profilings.
I don't know if that's deliberate or not, but using other savers this functionality is not present.
Question:
Having it profiler side could overwrite (accidentally or deliberately) existing profiling. I don't think saving the same id twice will merge the results?
Having it set at the profiler side, allows the profiler to control the id value.
and if reading the importer section:
it says importing the same profile twice creates duplicate profiling, so the duplicate id sent from profiler is not overwriting other profilers? is there any point then having value re-used? set from profiler?
cc @perftools/maintainers
The text was updated successfully, but these errors were encountered: