Commit graph

2857 commits

Author SHA1 Message Date
Charles Hall
96e6ac9563
fix service/rooms/spaces events 2024-07-16 11:16:08 -07:00
Charles Hall
b4d81bb067
fix service/rooms/event_handler events 2024-07-16 11:16:08 -07:00
Charles Hall
4b5d127368
fix service/rooms/state_cache events 2024-07-16 11:16:08 -07:00
Charles Hall
592e42ba7d
fix service/rooms/timeline events 2024-07-16 11:16:08 -07:00
Charles Hall
ee95b6be3c
fix api/client_server/sync events
Some duplicated-ish code from src/database/key_value/rooms/timeline.rs
about handling errors from `pdus_since`/`pdus_until`, it seems like the
error message was actually directly copy-pasted from there because it
referred to the wrong function lol
2024-07-16 11:16:08 -07:00
Charles Hall
dacb2ae7dd
fix api/client_server/context events 2024-07-16 11:12:08 -07:00
Charles Hall
4b9c6a754c
fix api/client_server/room events 2024-07-16 11:12:08 -07:00
Charles Hall
196c923a5a
fix api/client_server/account events 2024-07-16 11:12:08 -07:00
Charles Hall
d2fc2fad1f
fix service/rooms/state events 2024-07-16 11:12:08 -07:00
Charles Hall
1283dc6477
fix service/rooms/state_accessor events 2024-07-16 11:12:08 -07:00
Charles Hall
e7087444db
fix service/sending events 2024-07-16 11:12:08 -07:00
Charles Hall
60b89aba78
fix api/client_server/session events
And also add a new event for logging out to match the one for logging in
because why not.
2024-07-16 11:12:08 -07:00
Charles Hall
0aef00c58b
fix api/client_server/keys events 2024-07-16 11:12:08 -07:00
Charles Hall
42e397203a
fix service/pdu events 2024-07-16 11:12:08 -07:00
Charles Hall
7392880bf8
fix utils/error events 2024-07-16 11:12:08 -07:00
Charles Hall
5a376ceb0a
fix database/key_value/rooms/timeline events 2024-07-16 11:12:08 -07:00
Charles Hall
52decf0cea
fix service/pusher events 2024-07-16 11:12:07 -07:00
Charles Hall
9d8e1a1490
fix api/server_server events 2024-07-16 11:12:07 -07:00
Charles Hall
db666fe903
fix api/client_server/directory events 2024-07-16 11:12:07 -07:00
Charles Hall
b6cba0c4ae
extract closure into a function
This was mostly written by using rust-analyzer's "extract to function"
and "extract to variable" functionality.
2024-07-16 11:12:07 -07:00
Charles Hall
a7cdbab44a
fix database events 2024-07-16 11:12:07 -07:00
Charles Hall
e49fe04f10
fix api/appservice_server events 2024-07-16 11:12:07 -07:00
Charles Hall
162d01f615
fix service/uiaa events 2024-07-16 11:12:07 -07:00
Charles Hall
37beaea48b
fix main events 2024-07-16 11:12:07 -07:00
Charles Hall
f5e10f5a8f
fix api/ruma_wrapper/axum events 2024-07-16 11:12:07 -07:00
Charles Hall
ca4f780c93
fix api/client_server/membership events 2024-07-16 11:12:07 -07:00
Lambda
b05c91b13e
Update changelog for config organization changes
Charles wrote item 12 in the "Added" section.

Co-authored-by: Charles Hall <charles@computer.surgery>
2024-06-27 16:18:21 -07:00
Lambda
f89e1c7dfc
Allow tracing filters to be changed at runtime
ReloadHandle is taken from conduwuit commit
8a5599adf9eafe9111f3d1597f8fb333b8b76849, authored by Benjamin.

Co-authored-by: Benjamin Lee <benjamin@computer.surgery>
2024-06-27 16:04:23 -07:00
Lambda
f576aff7eb
Don't accidentally ignore observability errors 2024-06-27 16:04:23 -07:00
Lambda
5a6e4fac73
Move federation config to separate config section
This renames:

allow_federation -> federation.enable
trusted_servers -> federation.trusted_servers
max_fetch_prev_events -> federation.max_fetch_prev_events
max_concurrent_requests -> federation.max_concurrent_requests
2024-06-27 16:04:23 -07:00
Lambda
e0e7d8fd91
Make observability more configurable
The following are now configurable:

- the OpenTelemetry endpoint,
- the tracing-flame filename, and
- whether the log output should include timestamps (useful to disable if
  it goes straight into journald).
2024-06-27 16:04:23 -07:00
Lambda
df571818f1
Make tracing filters configurable per backend 2024-06-27 16:04:23 -07:00
Lambda
98d49554ce
Move observability config to separate config section
This renames:

allow_prometheus -> observability.metrics.enable
allow_jaeger -> observability.traces.enable
tracing_flame -> observability.flame.enable
log -> observability.logs.filter
log_colors -> observability.logs.colors
log_format -> observability.logs.format

New config values in these sections will follow.
2024-06-27 16:04:23 -07:00
Lambda
8a30817930
config: convert database backend to enum
This reports a nice error when the config is loaded, rather than later
when the database is initialized.
2024-06-27 16:04:23 -07:00
Lambda
d26b87a2f2
Move database config to separate section
This renames:

database_backend -> database.backend
database_path -> database.path
db_cache_capacity_mb -> database.cache_capacity_mb
rocksdb_max_open_files -> database.rocksdb_max_open_files

Charles updated the NixOS module.

Co-authored-by: Charles Hall <charles@computer.surgery>
2024-06-27 16:03:43 -07:00
Lambda
79d5d306cc Move TURN config to separate config section
This renames:

turn_username -> turn.username
turn_password -> turn.password
turn_uris -> turn.uris
turn_secret -> turn.secret
turn_ttl -> turn.ttl
2024-06-27 18:16:37 +00:00
Lambda
e911518aac config: make db_cache_capacity_mb field unconditional
This is also used by sqlite, causing builds with `--no-default-features
--features sqlite` to fail.
2024-06-27 18:16:37 +00:00
Lambda
b171f7c123 config: fix order of items 2024-06-27 18:16:37 +00:00
Benjamin Lee
9c44aa877c
changelog entry for auth chain room id mismatch logging 2024-06-26 09:11:14 -07:00
Benjamin Lee
3ca6d7776b
better log message for auth chain room id mismatch
The previous "Evil event in db" message does not indicate what's going
on, and does not help identify *which* events are causing the problem.
2024-06-26 09:10:58 -07:00
Lambda
b11cbb6991 Instrument rocksdb functions at TRACE level
This allows e.g. aggregate time statistics if you really care about it
by adding grapevine::database::abstraction::rocksdb=trace to the tracing
filter.
2024-06-26 06:11:59 +00:00
Charles Hall
6fb9abed62
update changelog 2024-06-24 12:43:28 -07:00
Charles Hall
027ff907db
fix changelog indentation
Whoops.
2024-06-24 12:43:28 -07:00
Charles Hall
cb036593ea
refactor send_request in api/server_server
Seriously, what is going on with the control flow in this codebase?
2024-06-24 12:43:28 -07:00
Charles Hall
e13db834ed
refactor handle_response in service/sending
Early returns good.
2024-06-24 12:43:28 -07:00
Charles Hall
f2e5b281c9
include method in otel.name for incoming requests
Also change the name of the field from path to endpoint since it's not
the exact request path, and swap the order of method and endpoint.
2024-06-24 12:43:28 -07:00
Charles Hall
1b51e0beec
increase the default log level
The vast majority of spans are at the info level, so increasing the log
level to info will greatly increase the amount of (useful!) inforamtion
included in the logs.

However, `ruma_state_res` generates a substantial amount of logs, so
that one gets to stay fixed at `warn` for now.
2024-06-24 12:43:28 -07:00
Charles Hall
32e6b3b039
don't log twice, make event structured 2024-06-24 12:43:28 -07:00
Charles Hall
e83a30af4b
reduce duplicate events
I hate `log_error`. A better way to do this would be to not reuse the
same error type literally everywhere, so you could distinguish, in
`crate::service::sending::Service::handle_response`, whether to emit an
event based on which function created the error. Fixing that is a lot
more work, though.
2024-06-24 12:40:59 -07:00
Charles Hall
82cc605b5f
reflow macro 2024-06-24 12:40:59 -07:00