Skip to content

2.26.3.1

Choose a tag to compare

@github-actions github-actions released this 23 Jul 06:53

What's changed

The 2.x line. Twelve packages binding dd-sdk-android 2.26.3
for .NET for Android and .NET MAUI.

dotnet add package DatadogNet.RUM.Android

Why a 2.x line exists

It is not simply an older 3.x. Two differences decide which line you want:

Android 5 support. 2.x has minSdk 21; dd-sdk-android 3.0 raised it to 23. An app that still
supports Android 5 or 5.1 can bind 2.x and cannot bind 3.x.

OpenTracing. 2.x tracing is OpenTracing-based — AndroidTracer implements
io.opentracing.Tracer, and you register it with GlobalTracer. 3.0 removed OpenTracing and
AndroidTracer outright. Tracing code does not port between the lines unchanged.

How the package set differs from 3.x

2.x (this line) 3.x
Packages 12 13
Trace modules one: DatadogNet.Trace.Android three: Trace, TraceApi, TraceInternal
OpenTracing DatadogNet.OpenTracing.Android none
Tracer entry point AndroidTracer + GlobalTracer DatadogTracing + GlobalDatadogTracer
Minimum API 21 23

DatadogNet.OpenTracing.Android is new and has no 3.x counterpart. It binds
io.opentracing:opentracing-api, -noop and -util 0.32.0, because no .NET binding for the Java
OpenTracing API exists on nuget.org — the OpenTracing package there is a native .NET
implementation of the same specification, sharing the name but none of the Java types.

Getting started with tracing

using Com.Datadog.Android.Trace;
using IO.Opentracing.Util;
using DdTrace = Com.Datadog.Android.Trace.Trace;   // collides with Android.OS.Trace

DdTrace.Enable(new TraceConfiguration.Builder().Build());

var tracer = new AndroidTracer.Builder().SetService("my-app").Build();
GlobalTracer.RegisterIfAbsent(tracer);

var span = tracer.BuildSpan("checkout").Start();
span.SetTag("cart.items", new Java.Lang.Integer(3));
using (tracer.ActivateSpan(span)) { /* work */ }
span.Finish();

The numeric SetTag overload is setTag(String, java.lang.Number), so pass a Java box rather than
a bare int — a C# int binds to the generic setTag(Tag<T>, T) overload and will not compile.

Everything else carries over from the 3.x line

RUM, Logs, Session Replay with the Material and Compose extensions, NDK crash reporting, WebView
tracking and the OkHttp integration behave the same, as does the convenience layer: IDisposable
view scopes, Dictionary<string, object?> attributes, and Exception overloads.

The same gotchas apply — TrackUserInteractions() not TrackInteractions(), Configuration.Builder
needing all four arguments, SessionReplay.Enable static while StartRecording is not, and MAUI
reporting one RUM view for the whole app unless you report views yourself.

What is not bound

The Session Replay wireframe mappers, the vendored dd-trace-java engine, and a handful of internal
types. All still ship in the .aar and still run. AndroidTracer and the whole
com.datadog.android.trace package bind without a single metadata rule.

Verified

All twelve packages pack across net8.0-android34.0, net9.0-android35.0 and
net10.0-android36.0 — except DatadogNet.SessionReplayCompose.Android, which is net9/net10 only.
87 package-layout tests pass, and 13 on-device smoke checks pass on an emulator against the packed
packages, including an OpenTracing span round-trip through AndroidTracer.

Full changelog: v3.12.1.1...v2.26.3.1

Packages

Bound against dd-sdk-android 2.26.3, targeting net8.0-android34.0, net9.0-android35.0 and net10.0-android36.0.

The first three components of 2.26.3.1 are the dd-sdk-android version; the fourth is this
repository's binding revision, which advances when the bindings or packaging change while
the native binaries stay put.

Package Wraps NuGet
DatadogNet.Internal.Android dd-sdk-android-internal 2.26.3.1
DatadogNet.Core.Android dd-sdk-android-core 2.26.3.1
DatadogNet.Logs.Android dd-sdk-android-logs 2.26.3.1
DatadogNet.OpenTracing.Android opentracing-api 2.26.3.1
DatadogNet.Trace.Android dd-sdk-android-trace 2.26.3.1
DatadogNet.RUM.Android dd-sdk-android-rum 2.26.3.1
DatadogNet.SessionReplay.Android dd-sdk-android-session-replay 2.26.3.1
DatadogNet.SessionReplayMaterial.Android dd-sdk-android-session-replay-material 2.26.3.1
DatadogNet.SessionReplayCompose.Android dd-sdk-android-session-replay-compose 2.26.3.1
DatadogNet.Ndk.Android dd-sdk-android-ndk 2.26.3.1
DatadogNet.WebView.Android dd-sdk-android-webview 2.26.3.1
DatadogNet.OkHttp.Android dd-sdk-android-okhttp 2.26.3.1
dotnet add package DatadogNet.RUM.Android --version 2.26.3.1

Licensing

The binding code is MIT; the bundled native binaries are Apache-2.0, as built and
published by Datadog. Each package ships both texts under licenses/.