apple / swift-distributed-tracing

Instrumentation library for Swift server applications
https://swiftpackageindex.com/apple/swift-distributed-tracing/main/documentation/tracing
Apache License 2.0
224 stars 34 forks source link

Rename TracerProtocol if possible #104

Closed fitomad closed 1 year ago

fitomad commented 1 year ago

The Protocol suffix in the TracerProtocol protocol's name is redundant in this case and brings unnecessary information.

Suggestion

Remove the Protocol suffix renaming the protocol to Trackable.

The same case could be applied to the LegacyTracerProtocol protocol. In that case, the protocol name becomes LegacyTrackable.

ktoso commented 1 year ago

Thanks for the feedback but it's a bit more complex than that.

The protocol suffix is a standard pattern when we need the proper name for a namsespace which we do here: enum Tracer

HOWEVER, we just worked out that we can lift functions into free functions and it'll work just as fine so we'll be recovering the protocol Tracer.

I'll close this as a duplicate of: https://github.com/apple/swift-distributed-tracing/issues/109

ktoso commented 1 year ago

Duplicate of https://github.com/apple/swift-distributed-tracing/issues/109

ktoso commented 1 year ago

Solved in: https://github.com/apple/swift-distributed-tracing/pull/113

fitomad commented 1 year ago

Thanks for the feedback but it's a bit more complex than that.

The protocol suffix is a standard pattern when we need the proper name for a namsespace which we do here: enum Tracer

HOWEVER, we just worked out that we can lift functions into free functions and it'll work just as fine so we'll be recovering the protocol Tracer.

I'll close this as a duplicate of: #109

Thanks for the explanation