1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Disable CLS and APM by default. v5.0.101

This commit is contained in:
winlin 2022-12-03 18:35:41 +08:00
parent 8adb1693cc
commit e86e0c8999
20 changed files with 104 additions and 9 deletions

View file

@ -181,6 +181,7 @@ srs_error_t SrsHybridServer::initialize()
return srs_error_wrap(err, "dvr async");
}
#ifdef SRS_APM
// Initialize TencentCloud CLS object.
if ((err = _srs_cls->initialize()) != srs_success) {
return srs_error_wrap(err, "cls client");
@ -188,6 +189,7 @@ srs_error_t SrsHybridServer::initialize()
if ((err = _srs_apm->initialize()) != srs_success) {
return srs_error_wrap(err, "apm client");
}
#endif
// Register some timers.
timer20ms_->subscribe(clock_monitor_);
@ -395,6 +397,7 @@ srs_error_t SrsHybridServer::on_timer(srs_utime_t interval)
thread_desc.c_str(), free_desc.c_str(), objs_desc.c_str()
);
#ifdef SRS_APM
// Report logs to CLS if enabled.
if ((err = _srs_cls->report()) != srs_success) {
srs_warn("ignore cls err %s", srs_error_desc(err).c_str());
@ -406,6 +409,7 @@ srs_error_t SrsHybridServer::on_timer(srs_utime_t interval)
srs_warn("ignore apm err %s", srs_error_desc(err).c_str());
srs_freep(err);
}
#endif
return err;
}