Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Timestamp to be non optional in TracingInstrument #118

@ktoso

Description

@ktoso

Today we offer:

self.startSpan(named: <#T##String##Swift.String#>, context: <#T##BaggageContextCarrier##Baggage.BaggageContextCarrier#>, ofKind: <#T##SpanKind##TracingInstrumentation.SpanKind#>, at: <#T##Timestamp?##TracingInstrumentation.Timestamp?#>), and span.end(at: <#T##Timestamp##TracingInstrumentation.Timestamp#>).

Note the optional Timestamp in start span, it really should be not optional I guess.

Start and end time as well as Event's timestamps MUST be recorded at a time of a calling of corresponding API.

https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#span-lifetime


Yes, there is a point to be made about "my impl can't take that timestamp because it has some internal way to get the time" (os_signpost) but in general such impls have to ignore the passed in time anyway 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions