tensorlakeai / indexify

A realtime serving engine for Data-Intensive Generative AI Applications
https://docs.tensorlake.ai
Apache License 2.0
931 stars 121 forks source link

feat(server): structured logging #1031

Closed seriousben closed 2 weeks ago

seriousben commented 2 weeks ago

Context

To help operationalize indexify-server, it needs to output structured logs.

What

indexify-server now defaults to structured logging unless it is started with the new --dev flag.

> ./indexify-server -h

Usage: indexify-server [OPTIONS]

Options:
  -d, --dev                   Development mode
  -c, --config <config file>  Path to config file
  -h, --help                  Print help
  -V, --version               Print version
> RUST_LOG=debug ./indexify-server  --dev
image
> RUST_LOG=debug ./indexify-server

{"timestamp":"2024-11-14T21:06:22.883233Z","level":"INFO","message":"starting system tasks executor","target":"indexify_server::service"}
{"timestamp":"2024-11-14T21:06:22.883277Z","level":"INFO","message":"server api listening on 0.0.0.0:8900","target":"indexify_server::service"}
{"timestamp":"2024-11-14T21:06:22.883217Z","level":"INFO","message":"starting scheduler","target":"indexify_server::service"}
{"timestamp":"2024-11-14T21:06:22.883218Z","level":"INFO","message":"starting garbage collector","target":"indexify_server::service"}
{"timestamp":"2024-11-14T21:06:26.758675Z","level":"DEBUG","message":"started processing request","target":"tower_http::trace::on_request","span":{"matched_path":"/internal/executors/:id/tasks","method":"POST","uri":"/internal/executors/CBphXAEycy0ktN_g2rFjE/tasks","name":"request"}}
{"timestamp":"2024-11-14T21:06:26.759261Z","level":"DEBUG","message":"finished processing request","latency":"0 ms","status":200,"target":"tower_http::trace::on_response","span":{"matched_path":"/internal/executors/:id/tasks","method":"POST","uri":"/internal/executors/CBphXAEycy0ktN_g2rFjE/tasks","name":"request"}}

Testing

Contribution Checklist