Skip to content

Conversation

@CommanderStorm
Copy link
Member

@CommanderStorm CommanderStorm commented Aug 2, 2025

This is like the previous PR a version of tracing

So by now we have had

  • the one where I configured everything 3x => did not work due to too much duplication
  • then was with the new crate and parsing/ intialising staticly
  • and now runtime-reconfiguration

Honestly, I still like the extra crate more.
Much more readad and extendable in the future.

The runtime reconfiguration of formatting options is tricky as I need to get around some compiler limtations.
Changing the log level the same way is sadly not as simple, this is where I am hitting the 'static-requring brick wall.
There are also some heavy tricks to allow for runtime recajigling of the log format (see the boxing and the reload layer).

I suspect that there is at least a bit of performance impact of all this work. Likely not enoguh to make a difference anyhow.

Before I do this work, shoud we go back to #1747 as a more reasonable approach?

Copilot AI review requested due to automatic review settings August 2, 2025 21:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a draft of runtime-reconfigurable tracing functionality for Martin, introducing a new tracing system that allows dynamic reconfiguration of logging formats while the application is running.

  • Adds a new LogFormatOptions enum with support for multiple log formats (Full, Compact, Bare, Pretty, JSON)
  • Implements ReloadableTracingConfiguration struct to enable runtime reconfiguration of logging format
  • Integrates tracing configuration with the application's configuration system and CLI arguments

Reviewed Changes

Copilot reviewed 8 out of 11 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
martin/src/utils/tracing.rs New module implementing the core tracing functionality with reloadable configuration
martin/src/utils/mod.rs Exports the new tracing module
martin/src/srv/config.rs Adds log format configuration option to observability settings
martin/src/pg/query_tables.rs Minor import reordering
martin/src/lib.rs Exports new tracing types from the utils module
martin/src/args/root.rs Adds CLI argument for log format configuration
martin/Cargo.toml Adds tracing-related dependencies
Cargo.toml Adds workspace-level tracing dependencies

@CommanderStorm CommanderStorm changed the title chore(logging) implement another draft of tracing chore(logging): runtime-reconfigurable trace configuration Aug 24, 2025
@CommanderStorm CommanderStorm self-assigned this Aug 31, 2025
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.

1 participant