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
* Bump minimum Swift version to 5.7
Motivation:
Now that Swift 5.9 is GM we should update the supported versions and
remove 5.6
Modifications:
* Update `Package.swift`
* Remove guards for swift <5.7
* Add deprecation annotations to `LegacyTracer` API
* Delete the 5.6 docker compose file and make a 5.10 one
* Update docs
Result:
Remove support for Swift 5.6, add 5.10
* remove warnings as errors: cannot do this because we support deprecated type
* formatting
---------
Co-authored-by: Konrad `ktoso` Malawski <[email protected]>
Copy file name to clipboardExpand all lines: Sources/Tracing/Docs.docc/Guides/ImplementATracer.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,6 @@ The primary goal and user-facing API of a ``Tracer`` is to create spans.
125
125
While you will need to implement all methods of the tracer protocol, the most important one is `startSpan`:
126
126
127
127
```swift
128
-
#ifswift(>=5.7.0)
129
128
extensionMyTracer: Tracer {
130
129
funcstartSpan<Instant: TracerInstant>(
131
130
_operationName: String,
@@ -147,7 +146,6 @@ extension MyTracer: Tracer {
147
146
return span
148
147
}
149
148
}
150
-
#endif
151
149
```
152
150
153
151
If you can require Swift 5.7 prefer doing so, and return the concrete ``Span`` type from the `startSpan` method.
@@ -170,4 +168,4 @@ public struct MySpan: Tracing.Span {
170
168
It is possible to implement a span as a struct or a class, but a ``Span``**must exhibit reference type behavior**.
171
169
In other words, adding an attribute to one reference of a span must be visible in other references to it.
172
170
173
-
The ability to implement a span using a struct comes in handy when implementing a "Noop" (do nothing) span and avoids heap allocations. Normal spans though generally will be backed by `class` based storage and should flush themselfes to the owning tracer once the span has been ended
171
+
The ability to implement a span using a struct comes in handy when implementing a "Noop" (do nothing) span and avoids heap allocations. Normal spans though generally will be backed by `class` based storage and should flush themselves to the owning tracer once the span has been ended
Copy file name to clipboardExpand all lines: Sources/Tracing/Docs.docc/Guides/InstrumentYourLibrary.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -211,7 +211,7 @@ While this code is very simple for illustration purposes, and it may seem surpri
211
211
212
212
The above steps are enough if you wanted to provide context propagation. It already enables techniques such as **correlation ids** which can be set once, in one system, and then carried through to any downstream services the code makes calls from while the context is set.
213
213
214
-
Many libraries also have the opportunity to start trace spans themselfes, on behalf of users, in pieces of the library that can provide useful insight in the behavior or the library in production. For example, the `HTTPServer` can start spans as soon as it begins handling HTTP requests, and this way provide a parent span to any spans the user-code would be creating itself.
214
+
Many libraries also have the opportunity to start trace spans themselves, on behalf of users, in pieces of the library that can provide useful insight in the behavior or the library in production. For example, the `HTTPServer` can start spans as soon as it begins handling HTTP requests, and this way provide a parent span to any spans the user-code would be creating itself.
215
215
216
216
Let us revisit the previous sample `HTTPServer` which restored context around invoking the user-code, and further extend it to start a span including basic information about the `HTTPRequest` being handled:
0 commit comments