Skip to main content

Logging

This section outlines the logging strategy for Dealer Management System (DMS) integrations. The logging system ensures comprehensive tracking and monitoring of all DMS API interactions, supporting audit, debugging, and performance analysis.

Key Benefits

  • Complete Audit Trail: Every DMS API interaction is logged with full context, providing traceability for all operations.
  • Performance Monitoring: Response times are tracked for every request, enabling performance analysis and optimization.
  • Error Debugging: Detailed error information, including status codes and error messages, is captured for troubleshooting.
  • Security: Sensitive data such as tokens and credentials are automatically masked in logs.
  • Organized Storage: Logs are stored in a hierarchical structure, allowing easy filtering by provider, context, and date.
  • Automatic Logging: Logging is built into the base class, requiring no manual intervention from developers.

Firestore Log Structure

Logs are organized in Firestore using a hierarchical path structure:

  • logs/dms/{providerId}/{context}/{year}/{month}/{day}/{documentId}
    • providerId: The DMS provider (e.g., keyloop)
    • context: The API context or operation (e.g., getAccessToken)
    • year, month, day: Date of the log entry
    • documentId: Auto-generated unique identifier for each log entry

Example log path:

/logs/dms/keyloop/getAvailabilityTimeSlots/2025/9/14/1CxXgcFO10oiIHc1v8fu

Log Entry Details

Each log entry contains the following information:

  • HTTP Method: The HTTP method used (GET, POST, etc.)
  • Request URL: The full URL of the API request
  • Request Details:
    • Timestamp when the request was sent
    • Request payload (with sensitive data masked)
  • Response Details (if available):
    • Timestamp when the response was received
    • HTTP status code
    • Response data (with sensitive data masked)
  • Error Details (if applicable):
    • Timestamp when the error occurred
    • Error message
    • HTTP status code and status text (if available)
    • Error response data
  • Response Time: Total duration of the request in milliseconds
  • Log Level: Indicates if the log is informational (info) or an error (error)
  • Log Timestamp: The overall timestamp for the log entry
Status: Accepted
Category: Protected
Authored By: Gladson on Oct 14, 2025
Revisions