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

APM: Check endpoint port and team.

This commit is contained in:
winlin 2022-09-19 17:54:18 +08:00
parent 6f7b242ce2
commit d4898bec3c
6 changed files with 63 additions and 5 deletions

View file

@ -3468,6 +3468,25 @@ bool SrsConfig::get_tencentcloud_apm_enabled()
return SRS_CONF_PERFER_FALSE(conf->arg0());
}
string SrsConfig::get_tencentcloud_apm_team()
{
SRS_OVERWRITE_BY_ENV_STRING("SRS_TENCENTCLOUD_APM_TEAM");
static string DEFAULT = "";
SrsConfDirective* conf = root->get("tencentcloud_apm");
if (!conf) {
return DEFAULT;
}
conf = conf->get("team");
if (!conf) {
return DEFAULT;
}
return conf->arg0();
}
string SrsConfig::get_tencentcloud_apm_token()
{
SRS_OVERWRITE_BY_ENV_STRING("SRS_TENCENTCLOUD_APM_TOKEN");