Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ All notable changes to this project will be documented in this file.

- Support configuring compression for OTEL ([#70]).
- Improve tracing details by adding a `tower_http::trace::TraceLayer` that creates spans for every HTTP request ([#71]).
- Support compressing HTTP contents, previously the content was always uncompressed.
This consumes more CPU, but also reduces the data amount sent to Trino clients.
E.g. `trino-cli` by default asks for `gzip` compressed content ([#74]).

### Changed

Expand All @@ -17,6 +20,7 @@ All notable changes to this project will be documented in this file.
[#70]: https://github.com/stackabletech/trino-lb/pull/70
[#71]: https://github.com/stackabletech/trino-lb/pull/71
[#73]: https://github.com/stackabletech/trino-lb/pull/73
[#74]: https://github.com/stackabletech/trino-lb/pull/74

## [0.4.1] - 2025-03-03

Expand Down
82 changes: 82 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ sqlx = { version = "0.8.2", features = [
strum = { version = "0.27", features = ["derive"] }
tokio = "1.39"
tower = "0.5"
tower-http = { version = "0.6", features = ["tracing"] }
tower-http = { version = "0.6", features = ["compression-full", "tracing"] }
tracing = "0.1"
tracing-opentelemetry = "0.25"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
Expand Down
3 changes: 2 additions & 1 deletion trino-lb/src/http_server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use axum_server::{tls_rustls::RustlsConfig, Handle};
use futures::FutureExt;
use snafu::{OptionExt, ResultExt, Snafu};
use tokio::time::sleep;
use tower_http::trace::TraceLayer;
use tower_http::{compression::CompressionLayer, trace::TraceLayer};
use tracing::info;
use trino_lb_persistence::PersistenceImplementation;

Expand Down Expand Up @@ -124,6 +124,7 @@ pub async fn start_http_server(
.route("/ui/index.html", get(ui::index::get_ui_index))
.route("/ui/query.html", get(ui::query::get_ui_query))
.layer(TraceLayer::new_for_http())
.layer(CompressionLayer::new())
.with_state(app_state);

if tls_config.enabled {
Expand Down
Loading