truewatch-app-demo
- Server
- Android
- iOS
TrueWatch 데모 사용 및 배포 안내
기능 설명
- "RUM" 데이터를 출력하며, Session View, Action, LongTask, Error를 포함하고 Native View와 Webview 페이지 모두의 데이터를 제공합니다
- "Log" 데이터를 출력합니다
- "애플리케이션 성능 모니터링" 데이터를 출력합니다
- SourceMap 기반 크래시 로그 심볼리케이션을 제공합니다
구조 기능 다이어그램

| 용어 | 의미 |
|---|---|
| Native | TrueWatch Demo 네이티브 인터페이스에 해당하는 데이터 처리를 의미합니다 |
| Webview | 앱에서 HTML을 로드하는 데 사용하는 컴포넌트 |
| TrueWatch Demo Webview | 앱에서 HTML을 로드하는 데 사용하는 컴포넌트 |
| TrueWatch Demo API | Demo API HTTP 요청 |
| TrueWatch Mobile SDK | TrueWatch Android/iOS 모바일 SDK |
| TrueWatch JS SDK | TrueWatch Web 모니터링 SDK |
| JS Bridge | 네이티브 앱과 Webview 간의 통신 채널을 의미합니다. TrueWatch 모바일 SDK는 TrueWatch JS SDK와 JSBridge를 통해 Webview 데이터를 TrueWatch Mobile SDK로 전송하여 앱 내 Webview 데이터를 추적합니다 |
| RUM | RUM 데이터 |
| Resource | RUM의 네트워크 요청 데이터 |
| TraceHeader | Http 요청에서 TraceId, SpanId 등의 데이터를 전달하는 APM Http Header 데이터 마커를 의미합니다 |
환경 배포
-
데모 접속 파일 준비
|-- app.py // HTTP access addresses required for Demo App configuration |-- static // Static files: js and image files |-- dataflux-rum.js // TrueWatch Web js SDK |-- images |-- logo.png // Webview display icon |-- demo-logo.png // Avatar display on the mobile "Mine" page |-- jquery.mini.js // jquery js |-- qrcode.mini.js // QR code processing |-- templates |--index.html // Webview html accessed by Demo App |--import_helper.html // TrueWatchDemo quick import configuration usage |-- update_input_value.py // Used to update datakit and Demo API addresses displayed in import_helper.html -
import_helper.html에 표시되는 주소 교체
- 스크립트로 교체(
python3과beautifulsoup4설치 필요)
python3 update_input_value.py demo-api-address-input $DEMO_API_ADDRESS templates/import_helper.html python3 update_input_value.py datakit-address-input $DATAKIT_ADDRESS templates/import_helper.html python3 update_input_value.py dataway-address-input $DATAWAY_ADDRESS templates/import_helper.html python3 update_input_value.py dataway-client-token-input $DATAWAY_CLIENT_TOKEN templates/import_helper.htmlimport_helper.html의 해당datakit-address-input,demo-api-address-input을 수동으로 교체
변수 의미 datakit-address-input import_helper.html의 Datakit Address 입력란 iddataway-address-input import_helper.html의 퍼블릭 Dataway 주소dataway-client-token-input import_helper.html의 퍼블릭 DatawayclientToken입력란 iddemo-api-address-input import_helper.html의 Demo API Address 입력란 idDATAKIT_ADDRESS 로컬 배포 datakit 데이터 수집 주소, 예: http://10.0.0.1:9529 DATAWAY_ADDRESS 퍼블릭 dataway 데이터 수집 주소, 예: http://10.0.0.1:9528 DATAWAY_CLIENT_TOKEN 퍼블릭 dataway 인증용 Token DEMO_API_ADDRESS 데모 api 요청 주소, 예: http://10.0.0.1:8000 - 스크립트로 교체(
-
데모 백엔드 서비스 시작
DD_SERVICE=GC_SERVICE_SDK_DEMO \ DD_SERVICE_MAPPING=postgres:postgresql,defaultdb:postgresql \ DD_TAGS=project:sdk_demo,env:test,version:1.0 \ DD_AGENT_HOST=localhost \ DD_AGENT_PORT=9529 \ ddtrace-run python3 app.py &> demo.log &
변수의 의미는 Datakit ddtrace Python 배포 환경 변수를 참고하세요
Sourcemap 기능
Sourcemap은 앱 크래시 데이터 심볼리케이션에 사용됩니다.
Sourcemap 업로드
Sourcemap을 업로드하는 방법은 curl 또는 수동 배치의 두 가지입니다. 수동 배치는 datakit이 배포된 머신에 대한 접근 권한이 필요합니다.
TrueWatch Studio Web에서 업로드
Studio 앱의 소스맵 업로드를 통해 source map을 업로드할 수 있습니다
앱 설치
- Android
- 외부 사용자는 소스 코드에서 직접 빌드하여 설치해야 합니다
- iOS:
- 외부 사용자는 소스 코드에서 직접 빌드하여 설치해야 합니다
TrueWatchDemo 앱 사용 안내
TrueWatchDemo의 Datakit 주소와 Demo api 주소는 자유롭게 변경할 수 있습니다. 처음 사용할 때는 먼저 "Edit Demo Configuration"을 진행해야 합니다
로그인
비밀번호는 기본적으로 자동 입력됩니다. 사용자 이름 truewatch 비밀번호 admin
Edit Demo Configuration
"로그인 페이지" > "Edit Demo Configuration". 리포팅 주소를 설정하고 저장한 후에는 구성이 저장된 뒤 재시작해야 합니다. iOS의 경우 백그라운드에서 프로세스를 수동으로 종료해야 합니다.
로컬 배포(Datakit)
해당하는 RUM App Id, Datakit Address, Demo API Address를 입력합니다
퍼블릭 DataWay 사용
해당하는 RUM App Id, Dataway Address, Demo API Address를 입력합니다
클립보드에서 가져오기
서버 배포가 완료되면 http://{demo_api_url}/improt_helper 페이지에 접속하여 구성을 빠르게 가져올 수 있습니다. 데스크톱에서 improt_helper 페이지에 접속한 뒤 휴대폰으로 QR 코드를 스캔하거나, 휴대폰에서 improt_helper 페이지에 접속하여 "텍스트 복사"를 클릭하면 구성을 가져올 수 있습니다.
문제 해결
"Edit Demo Configuration" 구성 페이지에서 앱 접속에 대한 "주소 확인"을 수행할 수 있습니다. "Edit Demo Configuration"의 진입점은 "로그인 페이지"와 메인 인터페이스의 "Mine" 페이지에서 찾을 수 있습니다.
Jimmy Soh leads presales and product at TrueWatch. He writes about the thinking behind TrueWatch's product design, the direction of its Toby AI products, and the questions customers ask most often when they start onboarding. His articles draw on his day-to-day work with engineering teams as they evaluate and roll out the platform.



