Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Add logging & tracing to the application #22

@vdye

Description

@vdye

Provide tracing & logging options to provide users more visibility into the operation of the bundle server. This information can be useful when debugging, monitoring operation of the system, etc. To keep things simple (and privacy-conscious), the only options for logging will be "to a file" or "to stdout".

Specification

The two best options (AFAICT) seem to be OpenTelemetry tracing or trace2, output as structured JSON.

Option Pros Cons
OTel - Widely-used
- Existing SDK
- Spans only written when finished
trace2 - Real-time output
- Simple API
- Lower adoption (only Git and Git Credential Manager?)
- Fields don't fit well with web server

Ultimately, the goal for the bundle server would be to support both conventions; with that in mind, the logger interface should be general enough to eventually accommodate both.

Log exporting

Even with a specification, we still need to be able to export the log data to a file. There are a number of structured loggers in Go, but the performance benefits and configurability of zap make it the preferred choice for this initial implementation.

Rejected

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions