- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
If you have not set up the SDK yet, follow the in-app setup instructions or refer to the Roku RUM setup documentation.
roUrlTransfer
Network requests made directly with a roUrlTransfer
node must be tracked.
For synchronous requests, you can use Datadog’s datadogroku_DdUrlTransfer
wrapper to track the resource automatically. This wrapper supports most features of the roUrlTransfer
component, but does not support anything related to async network calls.
For example, here’s how to do a GetToString
call:
ddUrlTransfer = datadogroku_DdUrlTransfer(m.global.datadogRumAgent)
ddUrlTransfer.SetUrl(url)
ddUrlTransfer.EnablePeerVerification(false)
ddUrlTransfer.EnableHostVerification(false)
result = ddUrlTransfer.GetToString()
For asynchronous requests, automatic instrumentation is not supported. You need to track the resource manually. The following code snippet shows how to report the request as a RUM Resource:
sub performRequest()
m.port = CreateObject("roMessagePort")
request = CreateObject("roUrlTransfer")
' setup the node url, headers, …
timer = CreateObject("roTimespan")
timer.Mark()
request.AsyncGetToString()
while (true)
msg = wait(1000, m.port)
if (msg <> invalid)
msgType = type(msg)
if (msgType = "roUrlEvent")
if (msg.GetInt() = 1) ' transfer complete
durationMs& = timer.TotalMilliseconds()
transferTime# = datadogroku_millisToSec(durationMs&)
httpCode = msg.GetResponseCode()
status = "ok"
if (httpCode < 0)
status = msg.GetFailureReason()
end if
resource = {
url: requestUrl
method: "GET"
transferTime: transferTime#
httpCode: httpCode
status: status
}
m.global.datadogRumAgent.callfunc("addResource", resource)
end if
end if
end if
end while
end sub
Whenever you use a Video
or an Audio
node to stream media, you can forward all roSystemLogEvent
you receive to Datadog as follows:
sysLog = CreateObject("roSystemLog")
sysLog.setMessagePort(m.port)
sysLog.enableType("http.error")
sysLog.enableType("http.complete")
while(true)
msg = wait(0, m.port)
if (type(msg) = "roSystemLogEvent")
m.global.datadogRumAgent.callfunc("addResource", msg.getInfo())
end if
end while
After your Roku channel is instrumented with RUM, you can further enrich user session information and gain finer control over the attributes collected by tracking custom events.
In addition to the default RUM attributes captured by the RUM Roku 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 cart value, merchant tier, or ad campaign) with code-level information (such as backend services, session timeline, error logs, or network health).
Adding user information to your RUM sessions makes it easy to:
The following attributes are optional, but you should provide at least one of them:
Attribute | Type | Description |
---|---|---|
id | String | Unique user identifier. |
name | String | User friendly name, displayed by default in the RUM UI. |
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 the datadogUserInfo
global field, after initializing the SDK, for example:
m.global.setField("datadogUserInfo", { id: 42, name: "Abcd Efg", email: "abcd.efg@example.com"})
In addition to the default attributes captured by the SDK automatically, you can choose to add additional contextual information, such as custom attributes, to your Logs and RUM events to enrich your observability within Datadog. Custom attributes allow you to filter and group information about observed user behavior (for example by cart value, merchant tier, or ad campaign) with code-level information (such as backend services, session timeline, error logs, and network health).
m.global.setField("datadogContext", { foo: "Some value", bar: 123})
추가 유용한 문서, 링크 및 기사: