Skip to content

Implement proper logging of API user activity #29794

Closed

Description

@OlgaPotiagalova

To support observability, troubleshooting, auditability, and security for API-based access, this epic focuses on implementing comprehensive and consistent logging for API user activity.

The goal is to ensure that all significant API interactions are traceable and recorded in a secure and structured way.

Objectives:

  • Improve traceability of API user behavior
  • Support faster troubleshooting of onboarding or usage issues
  • Enable audit trails for security and compliance
  • Lay groundwork for metrics and usage analytics

Activity

  1. added
    Entities Team
    on Jul 25, 2025
  2. severinbeauvais commented on Jul 30, 2025

    @severinbeauvais
    Collaborator

    How expansive and detailed do we want the logging to be? Need to be determined.

    Every error? Theoretically, we're doing this already. Do we need more error info? Can we talk to the people who would use this info for an idea what's missing?

    Every API call? Maybe. How much of the calls do we log? Some, for analytics and to help trouble-shooting.

    Three groups that would benefit:

    1. IT Ops
    2. Developers
    3. Analytics

    Considerations:

    • space considerations
    • retention policy
  3. TVWerdal commented on Aug 22, 2025

    @TVWerdal
    Collaborator

    Thor confirmed that legal-api is not yet ready to implement GCP structured logging. He first needs to reach the min required version of python.

  4. severinbeauvais commented on Aug 22, 2025

    @severinbeauvais
    Collaborator

    So... should this ticket be placed On Hold for now, or is there helpful work that could be performed now (say, in a sub-issue)? Sentry removal? Review of existing failure points?

  5. TVWerdal commented on Aug 22, 2025

    @TVWerdal
    Collaborator

    Thor has noted that we should be up to date by Monday.

  6. TVWerdal commented on Sep 4, 2025

    @TVWerdal
    Collaborator

    Logging was implemented by Thor as part of the upgrade to GCP - bcgov/lear#3739

    Remaining tasks:

    • Contact interested parties to understand the types of logs required, identify any existing gaps
    • Assess current logs what meets these needs, what is not required
    • Create plan to implement changes, remove clutter
    • Put together guidelines for logs that can be followed for future feature implementations/revisions
    • ?
  7. vikas-gov commented on Jan 29, 2026

    @vikas-gov
    Collaborator
    • Required minimum logging is implemented
    • Legal API upgrade ticket is pending (SRE/Thor), will be taken up separately
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Entities TeamOn Hold

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions