1
0
Commit Graph

21177 Commits

Author SHA1 Message Date
Eric Eastwood
c26fa2d0d1 Move to 72 schema version
Do as they tell us:
https://github.com/matrix-org/synapse/runs/7639487550?check_suite_focus=true
2022-08-02 15:10:01 -05:00
Eric Eastwood
72c718df54 Merge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry
Conflicts:
	docs/usage/configuration/config_documentation.md
	synapse/logging/opentracing.py

Got changes from:

 - https://github.com/matrix-org/synapse/pull/13362/files
2022-08-02 15:05:27 -05:00
Eric Eastwood
ba4a46a7fb Seems to (see test_side_by_side_spans) 2022-08-02 14:36:05 -05:00
Eric Eastwood
d72cacfb3e Add changelog 2022-08-02 14:32:45 -05:00
Eric Eastwood
fcc42208ae Update docs 2022-08-02 14:32:38 -05:00
Eric Eastwood
9d6fcf3ab9 Clean up some opentracing text references 2022-08-02 14:07:04 -05:00
Eric Eastwood
59facea792 Restore logging current_context (not sure why removed 2022-08-02 13:52:34 -05:00
Eric Eastwood
ad71bc39d6 End on exit is already the default expected behavior 2022-08-02 13:48:15 -05:00
Eric Eastwood
da396a2538 Add test for what happens when side by side spans in with statement 2022-08-02 13:43:06 -05:00
Eric Eastwood
b09651a00a Always return config path for config error 2022-08-02 13:31:23 -05:00
Eric Eastwood
fb0e8203ca More clear method names 2022-08-02 13:27:45 -05:00
Eric Eastwood
36d6648fad Remove type ignore comments
See https://github.com/matrix-org/synapse/pull/13400#discussion_r935887649
2022-08-02 13:22:58 -05:00
Eric Eastwood
0f93ec8d59 Fix lints 2022-08-02 12:49:57 -05:00
Eric Eastwood
dbd9005cd1 Revert crazy custom sampler and span process to try force tracing for users 2022-08-02 11:56:51 -05:00
Eric Eastwood
6bb7cb7166 Revert "Non-working try baggage to inherit force tracing/sampling"
This reverts commit d15fa457c9.
2022-08-02 11:43:28 -05:00
Eric Eastwood
d15fa457c9 Non-working try baggage to inherit force tracing/sampling 2022-08-02 11:43:17 -05:00
reivilibre
1c910e2216 Add a merge-back command to the release script, which automates merging the correct branches after a release. (#13393) 2022-08-02 15:56:28 +00:00
Sean Quah
8d317f6da5 Fix error when out of servers to sync partial state with (#13432)
so that we raise the intended error instead.

Signed-off-by: Sean Quah <seanq@matrix.org>
2022-08-02 12:12:44 +01:00
Olivier Wilkinson (reivilibre)
a2a867b521 Merge branch 'master' into develop 2022-08-02 11:56:02 +01:00
Olivier Wilkinson (reivilibre)
c2f4871226 Mention specific version in rc2 notes v1.64.0 2022-08-02 11:19:32 +01:00
Olivier Wilkinson (reivilibre)
cb209638ea Add upgrade notes 2022-08-02 11:10:26 +01:00
Olivier Wilkinson (reivilibre)
4e80ca2243 1.64.0 2022-08-02 11:04:08 +01:00
Eric Eastwood
b3cdbad985 PoC force tracing
Doesn't force tracing for the child spans yet
2022-08-02 02:36:56 -05:00
Eric Eastwood
6255a1a622 Fix tests and some lints 2022-08-01 19:07:11 -05:00
Eric Eastwood
00be06cfd9 Try to align read from edu content 2022-08-01 17:54:14 -05:00
Eric Eastwood
8e902b858d Remove what's left of scopemanager 2022-08-01 17:38:07 -05:00
Eric Eastwood
a9fb504dcd Implement start_active_span_from_edu for OTEL
AFAICT, this never worked before because everything was serialized into `content["org.matrix.opentracing_context"]`
but `start_active_span_from_edu` read from `content["opentracing"]`.
See https://github.com/matrix-org/synapse/pull/5852#discussion_r934960586

Do we even still want this?
2022-08-01 17:23:19 -05:00
Eric Eastwood
33fd24e48c todos 2022-08-01 16:21:40 -05:00
Eric Eastwood
322da5137f Fix some lints 2022-08-01 14:42:13 -05:00
reivilibre
e17e5c97e0 Faster Room Joins: don't leave a stuck room partial state flag if the join fails. (#13403) 2022-08-01 16:45:39 +00:00
Patrick Cloke
f8e7a9418a Fix missing import in federation_event handler. (#13431)
#13404 removed an import of `Optional` which was still needed
due to #13413 added more usages.
2022-08-01 14:14:29 +00:00
Sean Quah
224d792dd7 Refactor _resolve_state_at_missing_prevs to return an EventContext (#13404)
Previously, `_resolve_state_at_missing_prevs` returned the resolved
state before an event and a partial state flag. These were unwieldy to
carry around would only ever be used to build an event context. Build
the event context directly instead.

Signed-off-by: Sean Quah <seanq@matrix.org>
2022-08-01 13:53:56 +01:00
reivilibre
05aeeb3a80 Enable Complement CI tests in the 'latest deps' test run. (#13213)
Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
2022-08-01 10:55:31 +00:00
reivilibre
b817574be7 Re-enable running Complement tests against Synapse with workers. (#13420) 2022-08-01 11:51:44 +01:00
Richard van der Hoff
23768ccb4d Faster joins: fix rejected events becoming un-rejected during resync (#13413)
Make sure that we re-check the auth rules during state resync, otherwise
rejected events get un-rejected.
2022-08-01 11:20:05 +01:00
Eric Eastwood
7772f50e60 Use HTTP_HOST attribute 2022-07-30 02:07:46 -05:00
Eric Eastwood
070195afee Use correct type for what start_as_current_span returns
See:

 - https://github.com/open-telemetry/opentelemetry-python/pull/198#discussion_r333399436
 - https://github.com/open-telemetry/opentelemetry-python/issues/219
2022-07-29 22:49:34 -05:00
Eric Eastwood
d84815663e Passing tests and context manager doesn't seem to be needed 2022-07-29 22:44:21 -05:00
Eric Eastwood
041acdf985 Working second test although it's a bit pointless testing whether opentelemetry works 2022-07-29 22:18:59 -05:00
Eric Eastwood
d29a4af916 Move to start_active_span 2022-07-29 22:08:11 -05:00
Eric Eastwood
7c135b93bd Easier to follow local vs remote span tracing
The `incoming-federation-request` vs `process-federation_request` was first introduced in
https://github.com/matrix-org/synapse/pull/11870

 - Span for remote trace: `incoming-federation-request`
    - `child_of` reference: `origin_span_context`
    - `follows_from` reference: `servlet_span`
 - Span for local trace: `process-federation-request`
    - `child_of` reference: `servlet_span` (by the nature of it being active)
    - `follows_from` reference: `incoming-federation-request`
2022-07-29 21:49:47 -05:00
Eric Eastwood
786dd9b4b1 Explain weird function 2022-07-29 17:06:43 -05:00
Eric Eastwood
19d20b50e8 Record exception 2022-07-29 16:54:26 -05:00
Richard van der Hoff
d548d8f18d Merge tag 'v1.64.0rc2' into develop
Synapse 1.64.0rc2 (2022-07-29)
==============================

This RC reintroduces support for `account_threepid_delegates.email`, which was removed in 1.64.0rc1. It remains deprecated and will be removed altogether in a future release. ([\#13406](https://github.com/matrix-org/synapse/issues/13406))
2022-07-29 15:15:21 +01:00
Richard van der Hoff
979d94de29 update changelog v1.64.0rc2 2022-07-29 12:27:23 +01:00
Richard van der Hoff
6b4fd8b430 1.64.0rc2 2022-07-29 12:23:13 +01:00
3nprob
98fb610cc0 Revert "Drop support for delegating email validation (#13192)" (#13406)
Reverts commit fa71bb18b5, and tweaks documentation.

Signed-off-by: 3nprob <git@3n.anonaddy.com>
2022-07-29 10:29:23 +00:00
Brendan Abolivier
24ef1460f6 Explicitly mention which resources support compression in the config guide (#13221) 2022-07-29 09:09:57 +00:00
Eric Eastwood
2011ac2100 Fix using wrong type of context (Context vs SpanContext)
Fix error:
```
AttributeError: 'SpanContext' object has no attribute 'get'
```

`Context`:
```
{'current-span-1a226c96-a5db-4412-bcaa-1fdd34213c5c': _Span(name="sendToDevice", context=SpanContext(trace_id=0x5d2dcc3fdc8205046d60a5cd18672ac6, span_id=0x715c736ff5f4d208, trace_flags=0x01, trace_state=[], is_remote=False))}
```

`SpanContext`:
```
SpanContext(trace_id=0xf7cd9d058b7b76f364bdd649c4ba7b8a, span_id=0x287ce71bac31bfc4, trace_flags=0x01, trace_state=[], is_remote=False)
```
2022-07-29 00:50:37 -05:00
Eric Eastwood
1d208fa17e Fix invalid attribute type
```
Invalid type StreamToken for attribute value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types
```

Had to add a few more logs to find this instance since the warning doens't give much info where I am setting this invalid attribute.
This was good enough to find it in the code.
```
BoundedAttributes __setitem__ key=since_token value=StreamToken(room_key=RoomStreamToken(topological=None, stream=1787, instance_map=frozendict.frozendict({})), presence_key=481272, typing_key=0, receipt_key=340, account_data_key=1233, push_rules_key=8, to_device_key=57, device_list_key=199, groups_key=0)

BoundedAttributes __setitem__ key=now_token value=StreamToken(room_key=RoomStreamToken(topological=None, stream=1787, instance_map=frozendict.frozendict({})), presence_key=481287, typing_key=0, receipt_key=340, account_data_key=1233, push_rules_key=8, to_device_key=57, device_list_key=199, groups_key=0)

BoundedAttributes __setitem__ key=token value=StreamToken(room_key=RoomStreamToken(topological=None, stream=1787, instance_map=frozendict.frozendict({})), presence_key=481291, typing_key=0, receipt_key=340, account_data_key=1237, push_rules_key=8, to_device_key=57, device_list_key=199, groups_key=0)
```
2022-07-29 00:25:03 -05:00