- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
If you have not set up the Datadog Unity SDK for RUM yet, follow the in-app setup instructions or refer to the RUM Unity setup documentation. Learn how to set up OpenTelemetry with RUM Unity.
Custom Endpoint
true
SDK Verbosity
Type: Enum
Default: Warn
The level of debugging information the Datadog SDK should output. Higher levels will output more information.
Telemetry Sample Rate
20
The percentage rate at which Datadog sends internal telemetry data. A value of 100 means all telemetry data is sampled and sent to Datadog.If you select Enable Automatic Scene Tracking
, Datadog hooks into Unity’s SceneManager
to detect scenes loading and unloading, and start RUM Views appropriately. If you are using methods to move between scenes other than SceneManager
, or would like to track changes in views that occur without SceneManager
, you need to track views manually using DdRum.StartView
and DdRum.StopView
.
You can track specific user actions such as taps, clicks, and scrolls using DdRum.AddAction
.
To manually register instantaneous RUM actions such as RumActionType.Tap
, use DdRum.AddAction()
. For continuous RUM actions such as RumActionType.Scroll
, use DdRum.StartAction()
or DdRum.StopAction()
.
For example:
void DownloadResourceTapped(string resourceName) {
DatadogSdk.Instance.Rum.AddAction(
RumActionType.Tap,
resourceName,
);
}
When using DdRum.StartAction
and DdRum.StopAction
, the type
action must be the same for the Datadog Unity SDK to match an action’s start with its completion.
Datadog provides DatadogTrackedWebRequest
as a drop in replacement for UnityWebRequest
to enable tracking of resources and and HTTP calls from your RUM views.
You can use it the same way as you would any other UnityWebRequest
:
var request = DatadogTrackedWebRequest.Get("https://httpbin.org/headers");
yield return request.SendWebRequest();
Debug.Log("Got result: " + request.downloadHandler.text);
In addition to tracking resources automatically using `DatadogTrackedWebRequest, you can track specific custom resources such as network requests or third-party provider APIs using the following methods:
DdRum.StartResource
DdRum.StopResource
DdRum.StopResourceWithError
DdRum.StopResourceWithErrorInfo
For example:
// in your network client:
DatadogSdk.Instance.Rum.startResource(
"resource-key",
RumHttpMethod.Get,
url,
);
// Later
DatadogSdk.Instance.Rum.stopResource(
"resource-key",
200,
RumResourceType.Image
);
The string
used for resourceKey
in both calls must be unique for the resource you are calling in order for the Unity Datadog SDK to match a resource’s start with its completion.
To track specific errors, notify DdRum
when an error occurs with the message, source, exception, and additional attributes.
DatadogSdk.Instance.Rum.AddError("This is an error message.");
In addition to the default RUM attributes captured by the Datadog Unity SDK automatically, you can choose to add additional contextual information (such as custom attributes) to your RUM events to enrich your observability within Datadog.
Custom attributes allow you to filter and group information about observed user behavior (such as the cart value, merchant tier, or ad campaign) with code-level information (such as backend services, session timeline, error logs, and network health).
To set a custom global attribute, use DdRum.AddAttribute
.
DdRum.AddAttribute
.DdRum.RemoveAttribute
.Adding user information to your RUM sessions makes it easy to:
The following attributes are optional, provide at least one of them:
Attribute | Type | Description |
---|---|---|
usr.id | String | Unique user identifier. |
usr.name | String | User friendly name, displayed by default in the RUM UI. |
usr.email | String | User email, displayed in the RUM UI if the user name is not present. It is also used to fetch Gravatars. |
To identify user sessions, use DatadogSdk.SetUserInfo
.
For example:
DatadogSdk.Instance.SetUserInfo("1234", "John Doe", "john@doe.com");
You can add custom attributes to your user session. This additional information is automatically applied to logs, traces, and RUM events.
To remove an existing attribute, set it to null
.
For example:
DatadogSdk.Instance.AddUserExtraInfo({
'attribute_1': 'foo',
'attribute_2': null,
});
Use ClearAllData
to clear all data that has not been sent to Datadog.
DatadogSdk.instance.ClearAllData();