You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* DocC Setup
* Fix soundness script
* Workaround LinuxMain error in newer Swift versions
* Update Sources/Tracing/Docs.docc/InDepthGuide.md
Co-authored-by: YR Chen <[email protected]>
* Don't link to specific lines of code
Co-authored-by: YR Chen <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -226,9 +226,9 @@ While this is verbose, this is only the low-level building blocks that this libr
226
226
227
227
> Eventually convenience wrappers will be provided, automatically wrapping future types etc. We welcome such contributions, but likely they should live in `swift-distributed-tracing-extras`.
228
228
229
-
Once a system, or multiple systems have been instrumented, a Tracer been selected and your application runs and emits some trace information, you will be able to inspect how your application is behaving by looking at one of the various trace UIs, such as e.g. Zipkin:
229
+
Once a system, or multiple systems have been instrumented, a Tracer has been selected and your application runs and emits some trace information, you will be able to inspect how your application is behaving by looking at one of the various trace UIs, such as e.g. Zipkin:
230
230
231
-

231
+

232
232
233
233
### More examples
234
234
@@ -402,7 +402,7 @@ When adapting an existing library/framework to support `LoggingContext` and it a
402
402
403
403
Examples:
404
404
405
-
-`Lamda.Context` may contain `baggage` and a `logger` and should be able to conform to `LoggingContext`
405
+
-`Lambda.Context` may contain `baggage` and a `logger` and should be able to conform to `LoggingContext`
406
406
- passing context to a `Lambda.Context` unaware library becomes: `http.request(url: "...", context: context)`.
407
407
-`ChannelHandlerContext` offers a way to set/get baggage on the underlying channel via `context.baggage = ...`
408
408
- this context is not passed outside a handler, but within it may be passed as is, and the baggage may be accessed on it directly through it.
@@ -414,8 +414,8 @@ Generally application developers _should not_ create new context objects, but ra
414
414
415
415
If really necessary, or for the purposes of testing, one can create a baggage or context using one of the two factory functions:
416
416
417
-
-[`DefaultLoggingContext.topLevel(logger:)`](https://github.com/apple/swift-distributed-tracing-baggage/blob/main/Sources/Baggage/LoggingContext.swift#L232-L259) or [`Baggage.topLevel`](https://github.com/apple/swift-distributed-tracing-baggage-core/blob/main/Sources/CoreBaggage/Baggage.swift#L79-L103) - which creates an empty context/baggage, without any values. It should _not_ be used too frequently, and as the name implies in applications it only should be used on the "top level" of the application, or at the beginning of a contextless (e.g. timer triggered) event processing.
418
-
-[`DefaultLoggingContext.TODO(logger:reason:)`](https://github.com/apple/swift-distributed-tracing-baggage/blob/main/Sources/Baggage/LoggingContext.swift#L262-L292) or [`Baggage.TODO`](https://github.com/apple/swift-distributed-tracing-baggage-core/blob/main/Sources/CoreBaggage/Baggage.swift#L107-L136) - which should be used to mark a parameter where "before this code goes into production, a real context should be passed instead." An application can be run with `-DBAGGAGE_CRASH_TODOS` to cause the application to crash whenever a TODO context is still in use somewhere, making it easy to diagnose and avoid breaking context propagation by accidentally leaving in a `TODO` context in production.
417
+
-[`DefaultLoggingContext.topLevel(logger:)`](https://github.com/apple/swift-distributed-tracing-baggage/blob/main/Sources/Baggage/LoggingContext.swift) or [`Baggage.topLevel`](https://github.com/apple/swift-distributed-tracing-baggage-core/blob/main/Sources/CoreBaggage/Baggage.swift) - which creates an empty context/baggage, without any values. It should _not_ be used too frequently, and as the name implies in applications it only should be used on the "top level" of the application, or at the beginning of a contextless (e.g. timer triggered) event processing.
418
+
-[`DefaultLoggingContext.TODO(logger:reason:)`](https://github.com/apple/swift-distributed-tracing-baggage/blob/main/Sources/Baggage/LoggingContext.swift) or [`Baggage.TODO`](https://github.com/apple/swift-distributed-tracing-baggage-core/blob/main/Sources/CoreBaggage/Baggage.swift) - which should be used to mark a parameter where "before this code goes into production, a real context should be passed instead." An application can be run with `-DBAGGAGE_CRASH_TODOS` to cause the application to crash whenever a TODO context is still in use somewhere, making it easy to diagnose and avoid breaking context propagation by accidentally leaving in a `TODO` context in production.
419
419
420
420
Please refer to the respective functions documentation for details.
0 commit comments