Skip to content

refactor: Improve success logging #1152

Open
Open
@ankita-p17

Description

@ankita-p17

Prerequisites

  • Familiarity with current logging standards and patterns used across the platform
  • Understanding of key service workflows and request/response lifecycles

Summary

Currently, the platform logs errors and exceptions effectively, which is helpful for debugging failure cases. However, successful operations often do not produce structured logs, making it harder to trace the workflow when everything goes right.

This issue proposes improving success path logging by following the existing logging standards in the platform. Adding consistent logs at key points in the success flow will enhance observability and support better debugging, auditing, and workflow tracing.


Why this change?

  • Improves the ability to trace a complete request lifecycle through logs
  • Helps developers and DevOps teams understand system behavior during success cases
  • Makes log-based monitoring and alerting more comprehensive
  • Brings symmetry between error and success path logging
  • Follows existing structured logging standards in the platform

Proposed Improvements

  • Identify key success checkpoints in major workflows (e.g., authentication, credential issuance, invitation, etc.)
  • Add INFO-level logs with structured context (e.g., operation name, user ID, tenant ID, timestamp, outcome)
  • Follow existing log formatting and tagging conventions used for errors

Steps to Reproduce (Current Flow)

  1. Perform a successful operation (e.g., credential issue, invitation send, user registration)
  2. Observe that logs may be missing or minimal for successful flow
  3. Only errors or exceptions are consistently logged

Current Behavior

  • Error paths include detailed logs
  • Success paths often lack logging, making tracing difficult

Expected Behavior

  • Logs are emitted at key points during success scenarios
  • Logging is consistent with platform standards
  • Success logs include contextual data helpful for traceability

Things to consider:

  • Remember to not log data heavily revealing any sensitive information like credential/verification payload, client credentials, etc
  • The logs must not be overwhelming in the sense that it becomes difficult to track request. Hence, maintaining checkpoints for logging

Environment

CREDEBL Version: v2.0.1  

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomersquestionFurther information is requested

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions