Skip to content

refactor: switch to tracing with structured JSON logs#48

Merged
azerpas merged 10 commits into
azerpas:mainfrom
Mathious6:mathious6/feat/enhance-logs
Nov 2, 2025
Merged

refactor: switch to tracing with structured JSON logs#48
azerpas merged 10 commits into
azerpas:mainfrom
Mathious6:mathious6/feat/enhance-logs

Conversation

@Mathious6
Copy link
Copy Markdown
Collaborator

Why?

Replace free-form text logs with structured events for easy aggregation and Grafana handling (DCA stats).

What?

  • Migrate from log/log4rstracing, tracing-subscriber, tracing-appender.
  • Add pretty console (stderr) + JSON file sink at ~/.bourso/bourso.log (non-blocking).
  • Use structured fields in logs (e.g., quantity, symbol, order_id, highest_quote, etc.).
  • Expose settings/validate as public modules; unify logger init; minor error-context polish.
  • Update deps, drop legacy logging crates; add .devcontainer to .gitignore.

Main impact?

  • Machine-readable logs (ints as ints, strings as strings), better performance, ready for log pipelines & dashboards.

What next?

  • Provide sample Grafana dashboard + ingest guidelines.

Comment thread .gitignore Outdated
Comment thread src/bourso_api/src/client/trade/order.rs
Comment thread src/lib.rs
Comment thread src/settings.rs Outdated
Comment thread src/settings.rs
Copy link
Copy Markdown
Owner

@azerpas azerpas left a comment

Choose a reason for hiding this comment

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

Awesome work, thanks a lot! I just have a few interrogations, see comments :)

Comment thread src/settings.rs Outdated
Comment thread src/settings.rs Outdated
Comment thread .gitignore Outdated
@azerpas azerpas changed the title chore: switch to tracing with structured JSON logs refactor: switch to tracing with structured JSON logs Oct 29, 2025
@Mathious6 Mathious6 force-pushed the mathious6/feat/enhance-logs branch from b546ca6 to 09e9507 Compare October 30, 2025 02:13
Mathious6 and others added 7 commits November 1, 2025 16:42
* chore: add devcontainer configuration for Rust development

* chore: format Cargo.toml files with `Even Better TOML`

* chore: add rust-toolchain configuration for stable channel with rustfmt and clippy

* chore: include custom container name

* chore: add GitHub Actions extension to devcontainer
@Mathious6 Mathious6 force-pushed the mathious6/feat/enhance-logs branch from 7f86f0b to 623527a Compare November 1, 2025 20:51
Copy link
Copy Markdown
Owner

@azerpas azerpas left a comment

Choose a reason for hiding this comment

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

Again, great refactoring, thanks a lot!

@azerpas azerpas merged commit 093a22a into azerpas:main Nov 2, 2025
1 check passed
@Mathious6 Mathious6 deleted the mathious6/feat/enhance-logs branch November 8, 2025 20:13
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.

2 participants