pokryfka / aws-xray-sdk-swift

Unofficial AWS X-Ray SDK for Swift.
Apache License 2.0
14 stars 4 forks source link

Create convenience XRayRecorder initializer with EventLoop for XRayUDPEmitter #48

Closed pokryfka closed 4 years ago

ktoso commented 4 years ago

FYI, you may want to follow this pattern for EventLoopGroupProvider, we've been using it consistently in newer sswg libs. https://github.com/swift-server/async-http-client/blob/c9a9bf061d713c91ee9974fa8a6afe413acfd0e9/Sources/AsyncHTTPClient/HTTPClient.swift#L737-L743

Example / docs https://github.com/swift-server/async-http-client/blob/9c1c62b183036884332c2cfa2a526b4fa59b9ffe/README.md#request-response-api

pokryfka commented 4 years ago

@ktoso

thank you for the references, I have seen it in a few places (in fact its already defined in UDPClient) and will use it for consistency

having said that I think it would be very convenient if SwiftNIO defined it and promoted it in such way

currently different libraries implement (copy and paste) the same type in different namespaces.

In my case I will need to create the type twice (once in public XRayUDPEmitter and once in internal UDPClient) and map them (will add inline comment to illustrate it when its implemented)