swift-otel
swift-otel copied to clipboard
Remove ServiceLifecycle.Service conformance from public types not meant to be run by the adopter
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:
OTelSpanProcessorOTelBatchSpanProcessor