swift-otel icon indicating copy to clipboard operation
swift-otel copied to clipboard

Remove ServiceLifecycle.Service conformance from public types not meant to be run by the adopter

Open czechboy0 opened this issue 9 months ago • 0 comments
trafficstars

Remove ServiceLifecycle.Service conformance from public types not meant to be run by the adopter.

This has caused confusion for me, it wasn't clear which public types that conform to Service created during OTel bootstrap I should add to my ServiceGroup, and which ones get run automatically by other Service types.

I suggest we remove the Service conformance of any public types that aren't meant to be added to the adopter's ServiceGroup explicitly. Instead, we should just make them have a func run() async throws, so this isn't a functional change.

List:

  • OTelSpanProcessor
  • OTelBatchSpanProcessor

czechboy0 avatar Jan 24 '25 08:01 czechboy0