Releases: DataDog/dd-sdk-ios
1.3.0-beta3
Features
• Auto-Instrumentation for Tracing 🤖
• Tracing for Objective-C 🧓
How to use auto-instrumentation:
Step 1: Set Datadog.Configuration.tracedHosts
to your domains
Step 2: Set tracingEnabled
Step 3: Set Global.sharedTracer
to a Datadog.Tracer
instance
🚀 Your network requests are automatically traced now!
IMPORTANT!
Auto-tracing is disabled by default
If auto-tracing is NOT enabled swizzling does not happen
Enabling auto-tracing by following the steps above results in swizzling URLSession.dataTaskWithURL:completion:
and URLSession.dataTaskWithRequest:completion:
methods.
You can look at how we swizzle methods here and/or what the new implementations of those methods are here and here.
1.3.0-beta2
This beta brings more to Distributed Tracing for iOS apps 🚀.
Features
- The
span.setBaggageItem(key:value:)
is now available (#144). This enables attributes propagation from parentspan
to its children.
Bug Fixes
Upgrade From 1.3.0-beta1
- Starting from
-beta2
, we embed the Open Tracing interfaces inDatadog
module (#154).DDTracer
is renamed toTracer
:
import Datadog
Global.sharedTracer = Tracer.initialize(...)
- This (#154) also means less hassle in
Podfile
as now it only requirespod DatadogSDK
.
More in iOS Trace Collection guide.
1.3.0-beta1
Features
- This release brings the
-beta1
version of Distributed Tracing for iOS apps ⭐. From now, you'll be able to send traces to Datadog and let us visualise the timings of your code execution. If you're using Datadog instrumentation on backend, this also includes full-stack trace propagation.
Instantiate DDTracer
:
import Datadog
import OpenTracing
Global.sharedTracer = DDTracer.initialize(
configuration: DDTracer.Configuration(
sendNetworkInfo: true
)
)
and start instrumenting your code:
let span = Global.sharedTracer.startSpan(operationName: "something I measure")
// do something you want to measure ...
// ... then, when the operation is finished:
span.finish()
Read more in iOS Trace Collection guide.
Improvements
typealias DDLogger = Datadog.Logger
is introduced, to help avoiding compiler ambiguity in projects defining their ownLogger
class (#143), solves #127 and #142 (thanks @krzysztofzablocki , @amyslies)
1.2.2
1.2.1
1.2.0
Features
- The
serviceName
default value is changed to app bundle identifier + can be customized globally (#102)
Bug Fixes
- Fixed family of
NWPathMonitor
crashes (#110), solves #110, #70 (thanks @LeffelMania, @00FA9A, @jegnux)
Improvements
- Milliseconds precision for logs (#96), solves #95 (thanks @flobories)
- Improved logs delivery for app extensions (#84), solves #52 (thanks @lmramirez)
Other Changes
- The in-build
source
value was changed frommobile
toios
(#111) Package.swift
is updated to link the SDK as dynamic framework (#82)
Upgrade Steps
Datadog.Configuration
builder now requires the environment
value to be passed along with clientToken
:
Datadog.Configuration
.builderUsing(clientToken: "<client-token>", environment: "<environment>")
See details
What can I use the environment
for?
This will enable you to filter data from different environments (staging
| production
| ...) by using env:
filter on app.datadoghq.com. If you don't have diversed environments, "production"
might be a good default.
Eventual Breaking Changes in Dashboards and Pipelines
If any of your app.datadoghq.com dashboards or pipelines depends on service
or source
attribute, you may need to update them.
See details
New default value for service
attribute
If you were not using .set(serviceName:)
to explicitly set the service for Logger.builder
the default value of "ios"
was used. In 1.2.0
, this default is changed to application bundle identifier. If your dashboards depend on "ios"
this might break.
To make it compatible, use either the .set(serviceName:)
on individual Logger.builder
or set the default service name for all loggers in Datadog.Configuration.builderUsing(...).set(serviceName: "...")
.
New default value for source
attribute
We changed the value of source
attribute from mobile
to ios
. If any of your dashboards or pipelines depends on this, please update them accordingly.