Quentin Gliech
d1b9a4980c
Update opentelemetry to 0.24.0
2024-07-25 11:01:43 +02:00
Quentin Gliech
2e63e3da71
Write an adapter for opentelemetry-http
2024-07-05 10:07:40 +02:00
Quentin Gliech
e7f50a92d6
Move tower-http dep to the workspace and adapt mas-axum-utils
...
We removed here the Timeout layer on the HTTP client service, because it
required the body to be Default, which isn't the case anymore. Not sure
what to do about it.
2024-07-05 10:07:40 +02:00
Quentin Gliech
dcb9bdeecf
Remove the client features from mas-oidc-client and replace it in tests
2024-07-05 10:07:40 +02:00
Quentin Gliech
ea85be55e6
Upgrade rustls and update mas-http client bits
2024-07-05 10:07:40 +02:00
reivilibre
49e8fe57f4
Improve errors when MAS contacts the Synapse homeserver ( #2794 )
...
* Add some drive-by docstrings
* Change text rendering of catch_http_codes::HttpError
Using `#[source]` is unnatural here because it makes it look like
two distinct errors (one being a cause of the other),
when in reality it is just one error, with 2 parts.
Using `Display` formatting for that leads to a more natural error.
* Add constraints to `catch_http_code{,s}` methods
Not strictly required, but does two things:
- documents what kind of function is expected
- provides a small extra amount of type enforcement at the call site,
rather than later on when you find the result doesn't implement Service
* Add a `catch_http_errors` shorthand
Nothing major, just a quality of life improvement so you don't have to
repetitively write out what a HTTP error is
* Unexpected error page: remove leading whitespace from preformatted 'details' section
The extra whitespace was probably unintentional and makes the error harder to read,
particularly when it wraps onto a new line unnecessarily
* Capture and log Matrix errors received from Synapse
* Drive-by clippy fix: use clamp instead of min().max()
* Convert `err(Display)` to `err(Debug)` for `anyhow::Error`s in matrix-synapse support module
2024-06-07 11:14:04 +00:00
Quentin Gliech
dde907758e
Use OTEL semantic conventions constants for most attributes
2024-03-19 17:15:14 +01:00
Quentin Gliech
6eb6209bd8
Use rustls-platform-verifier for cert validation
...
This simplifies by removing the mutually exclusive `native-roots` and
`webpki-roots` features with something that is suitable for all
platforms.
2024-03-06 14:03:59 +01:00
Quentin Gliech
d20b0dc81d
Fix the native-certs (and therefore docker) build
2024-02-02 14:39:24 +01:00
Quentin Gliech
aeca03a120
Upgrade rustls
2024-02-02 11:45:20 +01:00
Quentin Gliech
a0f5f3c642
Enable clippy lints on a workspace level
...
This enables a lot more lints than before in some crates, so this fixed a lot of warnings as well.
2023-12-05 17:20:42 +01:00
Quentin Gliech
54071c4969
Make the HTTP client factory reuse the underlying client
...
This avoids duplicating clients, and makes it so that they all share the same connection pool.
2023-09-14 16:52:01 +02:00
Quentin Gliech
17e28f56c1
Upgrade Rust to 1.72.0
...
Fixes new clippy errors and upgrade other tools
2023-08-28 18:05:56 +02:00
Quentin Gliech
e430e9d414
rustls: use RootCertStore.add_trust_anchors instead of deprecated RootCertStore.add_server_trust_anchors
2023-08-09 12:01:08 +02:00
Quentin Gliech
e79da4a949
Bump Rust dependencies and remove unused ones
2023-07-27 17:23:08 +02:00
Quentin Gliech
68db56c2a2
Reimplementation of a postgres-backed storage with a shared PG listener
2023-07-17 19:04:06 +02:00
Quentin Gliech
daba2299d5
Fix build with native-root feature on
2023-04-18 23:01:43 +02:00
Quentin Gliech
09270b2493
Better tracing attributes in the HTTP client
2023-04-18 14:45:43 +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
8a2be43fe7
Proactively provision users on registration & sync threepids
2023-04-14 10:22:22 +02:00
Quentin Gliech
ca112d45e1
ci: Update clippy to 1.66 and fix new warnings
2022-12-16 18:16:18 +01:00
Quentin Gliech
e8c8d0bf8a
Remove the ServerLayer
from mas-http
2022-12-05 19:39:51 +01:00
Quentin Gliech
4227fa7a83
Add a global HTTP client factory
2022-12-05 19:39:51 +01:00
Quentin Gliech
d514a8922c
Cleanup HTTP client building
2022-12-05 19:39:51 +01:00
Quentin Gliech
bedcf44741
WIP: upstream OIDC provider support
2022-12-05 19:39:51 +01:00
Quentin Gliech
7f9be07e8d
Move the BoxCloneSyncService to mas-http
2022-12-05 19:39:51 +01:00
Quentin Gliech
c76a1dd2e7
Bump the latest axum rc
2022-11-18 14:57:22 +01:00
Quentin Gliech
3f56031795
Automate schema updates
2022-11-09 19:17:12 +01:00
Quentin Gliech
13c7d2772f
Move the GraphQL schema to its own crate
2022-11-09 19:17:12 +01:00
Quentin Gliech
35e5a5a7a7
Better AWS SDK tracing
2022-11-04 09:31:50 +01:00
Quentin Gliech
a414936484
Trace AWS operations & share TLS connector with mas-http
2022-11-03 18:08:20 +01:00
Quentin Gliech
9756f3c704
Fix the default features set
2022-11-03 15:19:49 +01:00
Jonas Platte
cf6d5a076a
Use new tuple Layer impls instead of ServiceBuilder ( #475 )
...
Co-authored-by: Quentin Gliech <quenting@element.io >
2022-10-17 16:48:12 +02:00
Kévin Commaille
99f2ca3d57
Derive Clone for http requests structs
...
So they don't prevent a Service from implementing Clone.
2022-10-17 12:47:43 +02:00
Kévin Commaille
0829ab7e27
Fix imports used by feature-gated code
2022-10-17 12:47:20 +02:00
Quentin Gliech
7e288c0c5d
Have the listeners names in the metrics and traces
...
Also refactors the OTEL layer to have a separate metrics logic
2022-10-17 11:39:45 +02:00
Quentin Gliech
c548417752
Refactor listeners building
2022-10-17 11:39:45 +02:00
Quentin Gliech
e9fd0eb36a
Move the in-flight counter decrement to a drop guard
2022-09-28 11:13:53 +02:00
Quentin Gliech
56fdb64a84
HTTP metrics & other stuff
2022-09-28 11:13:53 +02:00
Quentin Gliech
7b819ffa8b
Simplify the HTTP client building
...
Also supports loading the WebPKI roots instead of the native ones for
TLS
2022-09-27 19:05:25 +02:00
Kévin Commaille
348044afdc
Make HTTP request layers convert to Bytes
...
Add layer to convert a request's Bytes to a Body.
2022-08-23 12:25:38 +02:00
Quentin Gliech
95eba8f88b
Apply suggestions from code review
...
Co-authored-by: Kévin Commaille <76261501+zecakeh@users.noreply.github.com >
2022-08-19 10:51:24 +02:00
Quentin Gliech
185ff622f9
Gate some crates behind features in mas-http
2022-08-19 10:51:24 +02:00
Quentin Gliech
9fe541f7b6
Add a layer to catch HTTP error codes
2022-08-19 10:51:24 +02:00
Quentin Gliech
d94442f972
Layer to application/x-www-form-urlencoded bodies
2022-08-19 10:51:24 +02:00
Quentin Gliech
398379e21b
Better Tower layers
2022-08-19 10:51:24 +02:00
Kévin Commaille
5c8b442747
Fix new clippy 0.1.63 warnings
2022-08-12 11:05:21 +02:00
Quentin Gliech
c1ed726dc8
Enable the clippy::str_to_string lint
2022-08-08 10:06:20 +02:00
Quentin Gliech
4870d1e899
Fix some false-positive clippy lints
...
Those were introduced in clippy 1.62 (under clippy::pedantic) and are in
proc-macro generated code
2022-07-01 16:36:35 +02:00
Quentin Gliech
f4ff7c296c
More OTEL attributes on HTTP requests
2022-04-08 14:16:34 +02:00