open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.76k stars 890 forks source link

Make the end timestamp and mutable span as requirements in onending #4240

Closed dmathieu closed 1 month ago

dmathieu commented 1 month ago

Changes

OnEnding specifies that the ending timestamp should be set when the callback runs, and the span should be mutable. These are requirements, so it seems like they should be marked as so.

MrAlias commented 1 month ago

There is no way to query the end timestamp on the span. Does it matter if it is set or not?

dmathieu commented 1 month ago

It does, because if the callback duration will affect the timestamp value if we set it afterwards.

MrAlias commented 1 month ago

I see. Should it be clarified that the end time should exclude the time it takes to run the processors? It seems like requiring it being set is more restrictive than it needs to be.

dmathieu commented 1 month ago

That makes sense. I've made the change.