diff options
Diffstat (limited to 'platform/src/proxy.cpp')
| -rw-r--r-- | platform/src/proxy.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/platform/src/proxy.cpp b/platform/src/proxy.cpp index 528d5ea..f683415 100644 --- a/platform/src/proxy.cpp +++ b/platform/src/proxy.cpp @@ -453,7 +453,8 @@ int tfe_stat_init(struct tfe_proxy * proxy, const char * profile) fs_handle = FS_create_handle(); FS_set_para(fs_handle, OUTPUT_DEVICE, fieldstat_output, (int)strlen(fieldstat_output) + 1); FS_set_para(fs_handle, APP_NAME, app_name, (int)strlen(app_name) + 1); - + value = 1; + FS_set_para(fs_handle, OUTPUT_PROMETHEUS, &value, sizeof(value)); value = 1; FS_set_para(fs_handle, PRINT_MODE, &value, sizeof(value)); value = 0; @@ -555,6 +556,14 @@ int main(int argc, char * argv[]) breakpad_segv_generate(); } + int prometheus_port = 9001; + char prometheus_url_path[1024] = {0}; + MESA_load_profile_int_def(main_profile, "STAT", "statsd_set_prometheus_port", &(prometheus_port), 9001); + MESA_load_profile_string_def(main_profile, "STAT", "statsd_set_prometheus_url_path", prometheus_url_path, sizeof(prometheus_url_path), "/tfe_prometheus"); + FS_library_set_prometheus_port(prometheus_port); + FS_library_set_prometheus_url_path(prometheus_url_path); + FS_library_init(); + future_promise_library_init(future_profile); tango_cache_global_init(); |
