dd-trace-php
dd-trace-php copied to clipboard
Use \DDTrace\set_user() in its Laravel authentication module
Description
Relates to #1909.
It has no tests yet, just to show off for now.
Readiness checklist
- [ ] (only for Members) Changelog has been added to the release document.
- [ ] Tests added for this feature/bug.
Reviewer checklist
- [ ] Appropriate labels assigned.
- [ ] Milestone is set.
- [ ] Changelog has been added to the release document. For community contributors the reviewer is in charge of this task.
Is the hook on SessionGuard::id() actually needed?
public function id()
{
if ($this->loggedOut) {
return;
}
return $this->user()
? $this->user()->getAuthIdentifier()
: $this->session->get($this->getName());
}
It just ends up calling SessionGuard::user() anyway, so likely just the hook on user() is needed?
Indeed, it isn't :-)