File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,9 @@ func main() {
157157
158158### Logging
159159
160+ You can use the [ CtxLogger()] ( context.go ) function to retrieve the
161+ contextual [ log.Logger] ( https://github.com/ankorstore/yokai/tree/main/log ) from your workers, and emit correlated logs.
162+
160163The workers executions are logged, with the following fields added automatically to each log records:
161164
162165- ` worker ` : worker name
@@ -203,11 +206,12 @@ func main() {
203206}
204207```
205208
206- You can use the [ CtxLogger()] ( context.go ) function to retrieve the
207- contextual [ log.Logger] ( https://github.com/ankorstore/yokai/tree/main/log ) from your workers, and emit correlated logs.
208-
209209### Tracing
210210
211+ You can use the [ CtxTracer()] ( context.go ) function to retrieve the contextual tracer from your workers, and emit
212+ correlated spans: they will have the ` Worker ` and ` WorkerExecutionID ` attributes added with respectively the worker name
213+ and execution id.
214+
211215This module provides the [ AnnotateTracerProvider] ( trace.go ) function, to extend
212216a [ TracerProvider] ( https://github.com/open-telemetry/opentelemetry-go/blob/main/sdk/trace/provider.go ) to add
213217automatically current worker information id to the spans emitted during a worker execution:
@@ -258,10 +262,6 @@ func main() {
258262}
259263```
260264
261- You can use the [ CtxTracer()] ( context.go ) function to retrieve the contextual tracer from your workers, and emit
262- correlated spans: they will have the ` Worker ` and ` WorkerExecutionID ` attributes added with respectively the worker name
263- and execution id.
264-
265265### Metrics
266266
267267The [ WorkerPool] ( pool.go ) automatically generate metrics about:
You can’t perform that action at this time.
0 commit comments