An RTS TraceID is a globally unique request identifier for tracing and troubleshooting requests. This identifier is critical for improving integration efficiency.
Background
Troubleshooting playback issues using information such as a user's IP address and playback time is inefficient. This method requires searching through massive amounts of logs, and the difficulty increases when a single IP address has multiple playback sessions in the same period. Real-Time Streaming (RTS) provides a TraceID solution. An RTS TraceID is a globally unique identifier for each playback session. This identifier helps Alibaba Cloud quickly pinpoint issues. We strongly recommend that you correlate the RTS TraceID with your client logs.
You can obtain an RTS TraceID in the following ways:
Obtain from a demo player
Mobile client (Android/iOS)
For more information about playing a stream using the mobile client demo, see Run demos. After the playback request is established, click Troubleshoot on the RTS mobile player page. In the dialog box that appears, the value of RequestId is the TraceID.

Web client (H5)
For more information about playing a stream using the web client demo, see Run demos. After the playback request is established, click Troubleshoot on the RTS web player page to view the TraceID in the dialog box that appears.

Obtain in a production environment
A production environment is where you have integrated the SDK into your application and are no longer using the Alibaba Cloud demos.
Mobile client (Android/iOS)
Obtain the TraceID through an event callback from the ApsaraVideo Player SDK.
Each RTS playback generates a unique TraceID for troubleshooting.
Android
// Listen for the onInfo callback of the player and parse the DemuxerTraceID message. mRtsAliPlayer.setOnInfoListener(infoBean -> { if (infoBean.getCode() == InfoCode.DemuxerTraceID) { String traceId = infoBean.getExtraMsg(); });iOS
// Listen for the onPlayerEvent callback of the player and parse the DemuxerTraceID message. - (void)onPlayerEvent:(AliPlayer*)player eventWithString:(AVPEventWithString)eventWithString description:(NSString *)description { switch (eventWithString) { case EVENT_PLAYER_DEMUXER_TRACE_ID: { NSString *traceId = description; } break; default: break; } }
Web client (H5)
Obtain a TraceID from the signaling request response
A signaling request for H5 is an HTTP POST request. You can obtain the TraceID from the Network Type tab in your browser developer tools. For example, if the streaming URL is
artc://player.alicdn.com/a/b_RTS, the corresponding signaling request ishttp(s)://player.alicdn.com/a/b_RTS.Go to the RTS web player.
On the RTS web player page, enter the streaming URL for which Real-Time Streaming is enabled, such as
artc://player.alicdn.com/a/b_RTS.Click Start to play the RTS stream.
Press F12 to open the browser developer tools and select the Network tab.
Search for the signaling request
http(s)://player.alicdn.com/a/b_RTSand view the TraceID in the Response.
ApsaraVideo Player SDK for Web
The ApsaraVideo Player SDK for Web lets you obtain the RTS TraceID by subscribing to the
rtsTraceIdevent. Sample code:// This event is triggered when an RTS stream is successfully pulled. In the callback function, the traceId parameter is the TraceID of the stream, and the source parameter is the streaming URL of the current RTS stream. player.on('rtsTraceId', function(event) { console.log('EVENT rtsTraceId', event.paramData); })