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

Frontend logging fixes #221

Merged
merged 4 commits into from
Dec 23, 2024
Merged

Frontend logging fixes #221

merged 4 commits into from
Dec 23, 2024

Conversation

achen2401
Copy link

@achen2401 achen2401 commented Dec 18, 2024

Address https://www.pivotaltracker.com/story/show/188705822

  • Add user info to each event logging
  • Add analytics tag to tab/open/view events
  • Prevent cosri-frontend tag from being added multiple times

Example JSONs posted

{
  "patient": "Barney Abbott",
  "message": "MME calculated: Name: Fentanyl Transdermal System, 0.05 mg/hr...",
  "level": "info",
  "tags": ["mme-calc", "cosri-frontend"],
  "patientName": "Barney Abbott",
  "subject": "Patient/5ee05359-57bf-4cee-8e89-91382c07e162",
  "user": { "username": "amysbubble" }
}
{
  "patient": "Barney Abbott",
  "message": "overview tab",
  "level": "info",
  "tags": ["tab", "analytics", "cosri-frontend"],
  "patientName": "Barney Abbott",
  "subject": "Patient/5ee05359-57bf-4cee-8e89-91382c07e162",
  "user": { "username": "amysbubble" }
}

Copy link
Member

@ivan-c ivan-c left a comment

Choose a reason for hiding this comment

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

Thank you! I tested on dev and found a minor inconsistency with the rest of our logs

src/helpers/utility.js Outdated Show resolved Hide resolved
@achen2401
Copy link
Author

thank you @ivan-c for catching the inconsistency. I updated the description with updated user format in the JSON, e.g.

{
....
"user": { "username": "amysbubble" }
}

Copy link
Member

@ivan-c ivan-c left a comment

Choose a reason for hiding this comment

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

Found a minor issue. Tested on dev and looks good otherwise!

src/helpers/utility.js Outdated Show resolved Hide resolved
Co-authored-by: Ivan Cvitkovic <[email protected]>
@achen2401 achen2401 merged commit 572e5fa into develop Dec 23, 2024
2 checks passed
@achen2401 achen2401 deleted the fixup/event-logging branch December 23, 2024 15:05
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.

3 participants