Commit Graph
73 Commits
Author SHA1 Message Date
Quentin Gliech 9e60371aeb mas-cli: log the requester on the request log line
Add `requester=...` to the `http.server.response` log line, reading the
`Requester` recorded on the request's `LogContext`.
2026-06-17 14:14:24 +02:00
Quentin GliechandOlivier 'reivilibre' a209eef119 Apply suggestion from @reivilibre
Co-authored-by: Olivier 'reivilibre' <oliverw@element.io>
2026-06-17 12:51:40 +02:00
Quentin Gliech 21795d70dc Fix clippy lints for Rust 1.96.0
Rust 1.96.0 enables several new clippy lints. Apply the machine-applicable
fixes (`duration_suboptimal_units`, `map_unwrap_or`, `manual_is_variant_and`,
`unnecessary_trailing_comma`, `while_let_loop`) and suppress the
`result_large_err` lint in the config test modules, where the closures passed to
`Jail::expect_with` are required to return the large `figment::Error`.
2026-06-16 15:38:22 +02:00
Eric Eastwood 8d5cb566b1 Add context for what's bad 2026-04-14 15:07:47 -05:00
Quentin Gliech 792022ee18 Only serve pre-compressed gzip and brotli files 2025-12-18 14:39:58 +01:00
Quentin Gliech eeb5d61fe0 Don't extract the parent context if the span is disabled 2025-11-07 13:37:26 +01:00
Quentin Gliech 2a3ea458b3 Fix spurious "Failed to set parent context on span" error
This would happen when the `info` log level is surpressed, and therefore
the request span would not be enabled and fail to set the parent OTEL
context.
2025-11-07 11:34:42 +01:00
Quentin Gliech acb5290326 Adapt to the new tracing-opentelemetry API 2025-10-08 11:12:30 +02:00
Quentin Gliech ea873577aa Fix many clippy warnings
This is because the tracing-attributes update made clippy look at those
again. I've removed the `too_many_lines` lint, as it's not really useful
and we ignore it most of the time anyway.
2025-07-30 14:49:38 +02:00
Quentin Gliech 46bb1189f5 Replace usage of deprecated SentryHttpLayer::with_transaction 2025-07-30 14:27:07 +02:00
Quentin Gliech e3dd0470cf Make the compat_router also recover from errors in human-facing routes 2025-07-23 19:45:59 +02:00
Quentin Gliech 3d96dc9d47 Update license headers to match the actual license 2025-06-12 10:32:16 +02:00
Quentin Gliech 6f3c19f627 Reduce the cache time for 404s on the assets 2025-06-02 13:32:57 +02:00
Quentin Gliech 305914ee69 Fix the ordering of the middlewares (#4452) 2025-04-24 15:12:51 +02:00
Quentin Gliech cb7472995d Fix the ordering of the middlewares
This was causing the number of event processors to constantly grow
with each request, making the server use up more memory and CPU over
time.
2025-04-24 14:59:07 +02:00
Quentin Gliech 2a99af6349 perf: avoid unnecessary clones of the log context 2025-04-24 14:19:26 +02:00
Quentin Gliech af9dd97599 Fix Sentry creating transactions for every request 2025-04-18 09:59:24 +02:00
Quentin Gliech 78ccdf7db2 Log on every HTTP response 2025-04-18 09:58:57 +02:00
Quentin Gliech bfc92f5f28 Create a few basic logging contexts 2025-04-16 16:07:29 +02:00
Quentin Gliech ab622d7e3a Convert a few closures + async move to async closures 2025-02-21 16:22:21 +01:00
Quentin Gliech 3d2b67a0b2 Upgrade to Rust 1.85 and edition 2024 2025-02-21 16:15:02 +01:00
Quentin Gliech 9d4d09f7c1 Fix a crash on startup when a listener has an empty prefix 2025-02-20 08:31:11 +01:00
Quentin Gliech 5cbb576f94 Make the rate limiter available to the GraphQL API handlers 2025-01-13 16:58:42 +01:00
Quentin Gliech b5155cc8e4 Update the rest of the OTEL deps and use the new APIs 2024-12-12 16:04:48 +01:00
Quentin Gliech ed4b6c42a7 Remove (C) 2024-09-10 14:28:55 +02:00
Quentin Gliech f6bb100c0a License headers change 2024-09-05 13:25:42 +02:00
Quentin Gliech 1bdad262cd Disallow OAuth 2.0 use of the GraphQL API by default 2024-08-07 18:09:51 +02:00
Quentin Gliech 76755610cb config: allow serving the admin API routes 2024-07-26 11:36:55 +02:00
Quentin Gliech ee9a01ef40 OTEL: remove custom Header{Injector,Extractor} implementations 2024-07-25 11:27:07 +02:00
Quentin Gliech 798ca90241 Fix mas-cli
This does a few things:

 - move `bytes` to workspace dependencies
 - write an hyper-based transport for Sentry
 - ignore OTEL errors related to propagations
 - fix everything else in mas-cli
2024-07-05 10:07:40 +02:00
Quentin Gliech 8bc35f63d8 Flatten the http config
Also properly remove the `spa` resource
2024-03-22 13:33:09 +01:00
Quentin Gliech dde907758e Use OTEL semantic conventions constants for most attributes 2024-03-19 17:15:14 +01:00
Quentin Gliech eb950151af Upgrade OTEL and remove support for Jaeger and Zipkin exporters 2024-03-18 17:26:40 +01:00
Quentin Gliech aeca03a120 Upgrade rustls 2024-02-02 11:45:20 +01:00
Quentin Gliech 9b5c8fb44b Allow running the authentication service on a different base path 2023-10-06 14:07:55 +02:00
Quentin Gliech f20c8d8ef3 Infer client IP address from the peer address and the X-Forwarded-Proxy header 2023-09-20 20:24:30 +02:00
Quentin Gliech 6589f06d79 tracing: set the parent context from the incoming request again 2023-08-29 18:50:54 +02:00
Quentin Gliech 699dfba55f OpenTelemetry upgrade 2023-08-11 16:12:58 +02:00
Quentin Gliech 3e6ea9a158 Add a 404 HTMl fallback 2023-08-09 16:56:11 +02:00
Quentin Gliech 76653f9638 Better frontend assets handling and move the react app to /account/ (#1324)
This makes the Vite assets handling better, namely:

 - make it possible to include any vite assets in the templates
 - include the right `<link rel="preload">` tags for assets
 - include Subresource Integrity hashes
 - pre-compress assets and remove on-the-fly compression by the Rust server
 - build the CSS used by templates through Vite

It also moves the React app from /app/ to /account/, and remove some of the old SSR account screens.
2023-07-06 15:30:26 +02:00
Quentin Gliech 08f58db08b Replace the OTEL-based tracing layer with tracing based layers 2023-04-18 14:45:43 +02:00
Quentin Gliech 83cb9158a0 Fix clippy errors 2023-03-14 10:47:35 +01:00
Quentin Gliech 875025467e Log more errors and setup Sentry integration 2023-01-30 18:04:44 +01:00
Quentin Gliech e8c8d0bf8a Remove the ServerLayer from mas-http 2022-12-05 19:39:51 +01:00
Quentin Gliech dfcca89d30 Bump axum to 0.6.0 2022-11-29 09:37:12 +01:00
Quentin Gliech 809f836bb4 Migrate to axum 0.6.0-rc.5 2022-11-21 15:04:16 +01:00
Quentin Gliech 9c0ece7512 Do not embed the templates and static files in the binary 2022-11-18 22:37:55 +01:00
Quentin Gliech a86798d2b3 Switch to camino's Utf8Path* instead of std::path::Path* 2022-11-18 19:02:26 +01:00
Quentin Gliech c76a1dd2e7 Bump the latest axum rc 2022-11-18 14:57:22 +01:00
Quentin Gliech 933022850b Serve the SPA by the server 2022-11-18 13:43:01 +01:00