[core] Deprecate get_object_id() and migrate remaining usages to get_object_id_to() (#12629)
This commit is contained in:
1 parent
ba73289b28
commit
0c566c6f00
3 files changed
+17
-4
No files matched your search
@@ -112,7 +112,11 @@ void PrometheusHandler::handleRequest(AsyncWebServerRequest *req) {
|
||||
|
||||
std::string PrometheusHandler::relabel_id_(EntityBase *obj) {
|
||||
auto item = relabel_map_id_.find(obj);
|
||||
return item == relabel_map_id_.end() ? obj->get_object_id() : item->second;
|
||||
if (item != relabel_map_id_.end()) {
|
||||
return item->second;
|
||||
}
|
||||
char object_id_buf[OBJECT_ID_MAX_LEN];
|
||||
return obj->get_object_id_to(object_id_buf).str();
|
||||
}
|
||||
|
||||
std::string PrometheusHandler::relabel_name_(EntityBase *obj) {
|
||||
|
||||
Reference in new issue
Block a user