|
err := w.service.StartAsync(context.Background()) |
Using context.Background() creates an empty context when starting which can cause non-obvious behavior. For example, if your service is using logging.FromContext(ctx) this will result in issues like: no logger was found in the context, so using NopLogger. Ideally dskit should use the passed in serviceContext here instead of making a new context.
dskit/modules/module_service.go
Line 83 in fb7d1aa
Using
context.Background()creates an empty context when starting which can cause non-obvious behavior. For example, if your service is usinglogging.FromContext(ctx)this will result in issues like:no logger was found in the context, so using NopLogger. Ideally dskit should use the passed inserviceContexthere instead of making a new context.