Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add to device tracing id #7713

Merged
merged 5 commits into from
Dec 7, 2022
Merged

Conversation

BillCarsonFr
Copy link
Member

@BillCarsonFr BillCarsonFr commented Dec 5, 2022

Type of change

  • Technical

Content

Fixes #7708

Adding a tracing id to to-device messages that can be tracked synapse side in order to debug to-device delivery problems.

EA logs on reception updated to match web

received to-device m.room_key from:@sample:localhost:8480 id:b62c9f76-880d-4fbe-b9d7-f9b13c957d8d

EA logs on sending updated to match web

I  Sent to device  type=m.room.encrypted txnid=d99afdf1-b244-478b-bd72-eba892419893 [@eve:localhost:8480/YJQWVBZUWC (msgid 21ba49f2-8be0-440f-9c22-ba6e41a0d83c),@eve:localhost:8480/PMFTXZAUTL (msgid 58cd9624-137a-4c05-b5da-1a9e587364ef),@web:localhost:8481/FJQUOWZCIX (msgid f854cc8e-603f-48d5-953c-1ed1864b91cd)]
I  shareUserDevicesKey() : sendToDevice succeeds after 158 ms

Decorated content from sync:

{
  "content": {
    "algorithm": "m.olm.v1.curve25519-aes-sha2",
    "ciphertext": {
      "gMObR+/4dqL5T4DisRRRYBJpn+OjzFnkyCFOktP6Eyw": {
        "body": "AwogrdbTbG8VCW....slqU",
        "type": 0
      }
    },
    "org.matrix.msgid": "6390a372-fd3c-4f56-b0d5-2f2ce39f2d56",
    "sender_key": "EWnYTm/yIQ1lStSIqO6fdVYvS69OfU2DzrX+q+1d+w8"
  },
  "type": "m.room.encrypted",
  "sender": "@sample:localhost:8480"
}

Exception

Verification to-device events will not be decorated, as they might use content signature that could break other clients (the hash in key.verification.start)

Motivation and context

See element-hq/element-meta#558 (comment)

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator

Checklist

@BillCarsonFr BillCarsonFr requested review from a team, fedrunov and richvdh and removed request for a team December 5, 2022 17:23
@sonarcloud
Copy link

sonarcloud bot commented Dec 6, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

79.4% 79.4% Coverage
0.0% 0.0% Duplication

@BillCarsonFr BillCarsonFr merged commit 01533db into develop Dec 7, 2022
@BillCarsonFr BillCarsonFr deleted the feature/bca/to_device_tracing branch December 7, 2022 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tracing Id for to device messages
3 participants