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

APM: Support distributed tracing by Tencent Cloud APM. v5.0.63

This commit is contained in:
winlin 2022-08-24 11:04:39 +08:00
parent 736c661808
commit 3e2f8622f8
49 changed files with 4989 additions and 719 deletions

View file

@ -38,6 +38,7 @@ using namespace std;
#include <srs_kernel_file.hpp>
#include <srs_app_hybrid.hpp>
#include <srs_app_threads.hpp>
#ifdef SRS_RTC
#include <srs_app_rtc_conn.hpp>
#include <srs_app_rtc_server.hpp>
@ -473,6 +474,7 @@ srs_error_t run_in_thread_pool()
return _srs_thread_pool->run();
}
#include <srs_app_tencentcloud.hpp>
srs_error_t run_hybrid_server(void* /*arg*/)
{
srs_error_t err = srs_success;
@ -498,6 +500,10 @@ srs_error_t run_hybrid_server(void* /*arg*/)
return srs_error_wrap(err, "init circuit breaker");
}
// When startup, create a span for server information.
ISrsApmSpan* span = _srs_apm->span("main")->set_kind(SrsApmKindServer);
srs_freep(span);
// Should run util hybrid servers all done.
if ((err = _srs_hybrid->run()) != srs_success) {
return srs_error_wrap(err, "hybrid run");