Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
02765258
Commit
02765258
authored
Jul 11, 2022
by
万齐军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apm修复量大问题,debug不上报
parent
43fa0556
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
YDLavManager.kt
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
+6
-2
ApmInit.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/app/ApmInit.kt
+8
-2
No files found.
m-audioim/src/main/java/com/ydl/audioim/YDLavManager.kt
View file @
02765258
...
...
@@ -5,6 +5,7 @@ import android.content.Context
import
android.os.Handler
import
android.text.TextUtils
import
com.alibaba.android.arouter.launcher.ARouter
import
com.apm.insight.log.VLog
import
com.google.gson.Gson
import
com.ydl.audioim.bean.AgoraInvitationBean
import
com.ydl.audioim.http.AudioApiRequestUtil
...
...
@@ -52,6 +53,7 @@ class YDLavManager {
companion
object
{
const
val
FILE_NAME
=
"consult.log"
private
const
val
TAG
=
"YDLavManager"
//当前sdk的登录状态
var
sdkStatus
=
-
1
...
...
@@ -429,7 +431,9 @@ class YDLavManager {
}
override
fun
onFailure
(
msg
:
String
?)
{
Apm
.
reportCustom
(
"agora_login_error"
,
msg
?:
""
,
Exception
(
msg
))
if
(
msg
!=
"LOGIN_ERR_ALREADY_LOGGED_IN"
)
{
Apm
.
reportCustom
(
"agora_login_error"
,
msg
?:
""
,
Exception
(
msg
))
}
LogUtil
.
e
(
"[agora]实时消息登录失败:$msg"
)
writeAgoraLog
(
"声网rtm登录失败:$msg-------Time:${
...
...
@@ -647,7 +651,7 @@ class YDLavManager {
* */
override
fun
onConnectionStateChanged
(
state
:
Int
,
reason
:
Int
)
{
val
msg
=
"state:${state},reason:${reason}"
Apm
.
reportCustom
(
"agora_connectionstate_error"
,
msg
,
Exception
(
msg
)
)
VLog
.
i
(
TAG
,
msg
)
sdkStatus
=
state
writeAgoraLog
(
"声网rtm登录状态:${state}-------Time:${AudioLogUtils.format.format(Calendar.getInstance().time)}"
,
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/app/ApmInit.kt
View file @
02765258
...
...
@@ -12,7 +12,10 @@ object Apm {
private
var
crash
:
MonitorCrash
?
=
null
private
var
hasInit
=
false
fun
initApm
(
context
:
Context
,
appId
:
String
,
vCode
:
Long
,
vName
:
String
,
debug
:
Boolean
,
uidCall
:
()
->
String
?)
{
if
(
debug
)
return
val
channel
=
if
(
debug
)
"debug"
else
WalleChannelReader
.
getChannel
(
context
)
crash
=
MonitorCrash
.
init
(
context
,
...
...
@@ -27,7 +30,7 @@ object Apm {
//.cpuMonitor(true)
//.fpsMonitor(true)
//.seriousBlockDetect(true)
.
blockDetect
(
tru
e
)
.
blockDetect
(
fals
e
)
// .enableWebViewMonitor(true)
.
channel
(
channel
)
.
debugMode
(
debug
)
...
...
@@ -35,10 +38,13 @@ object Apm {
.
setDynamicParams
(
ApmParams
(
crash
,
uidCall
))
ApmInsight
.
getInstance
().
init
(
context
,
builder
.
build
())
VLog
.
init
(
context
,
20
)
hasInit
=
true
}
fun
reportCustom
(
type
:
String
,
msg
:
String
,
throwable
:
Throwable
)
{
crash
?.
reportCustomErr
(
msg
,
type
,
throwable
)
if
(
hasInit
)
{
crash
?.
reportCustomErr
(
msg
,
type
,
throwable
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment