element-hq / dendrite

Dendrite is a second-generation Matrix homeserver written in Go!
https://element-hq.github.io/dendrite/
GNU Affero General Public License v3.0
40 stars 6 forks source link

"unsigned.age" field missing from events #1754

Closed matrixbot closed 3 weeks ago

matrixbot commented 3 weeks ago

This issue was originally created by @p-e-w at https://github.com/matrix-org/dendrite/issues/1754.

Background information

Description

Synapse -> Synapse

{
  ...
  "origin_server_ts": 1612587703370,
  "unsigned": {
    "age": 4060
  }
}

Dendrite -> Synapse

The age field is missing:

{
  ...
  "origin_server_ts": 1612588027946,
  "unsigned": {}
}

Synapse -> Dendrite

A non-canonical age_ts field is present, which appears to always be equal to origin_server_ts:

{
  ...
  "origin_server_ts": 1612588032002,
  "unsigned": {
    "age_ts": 1612588032002
  }
}

Why this matters

The entire unsigned field is explicitly marked as optional by the spec, but the age subfield is useful for breaking down latency measurements into more fine-grained metrics. This is done by PingPong, which currently cannot break down latencies when Dendrite is involved because of this issue.

matrixbot commented 3 weeks ago

This comment was originally posted by @neilalexander at https://github.com/matrix-org/dendrite/issues/1754#issuecomment-884999631.

We've decided to take no action on this at the moment and will revisit if more need arises.