wu-sheng commented on a change in pull request #4228: Support Browser protocol
at OAP
URL: https://github.com/apache/skywalking/pull/4228#discussion_r368230531
##########
File path:
oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/NotifyHandler.java
##########
@@ -82,6 +84,38 @@ public NotifyHandler(AlarmRulesWatcher alarmRulesWatcher) {
endpointMetaInAlarm.setName(textName);
metaInAlarm = endpointMetaInAlarm;
+ } else if (DefaultScopeDefine.inServicePageCatalog(scope)) {
+ String metricsId = meta.getId();
+ String[] ids = metricsId.split(Const.ID_SPLIT);
+ int serviceId = Integer.parseInt(ids[0]);
+ int pagePathId = Integer.parseInt(ids[1]);
+ ServiceInventory serviceInventory =
serviceInventoryCache.get(serviceId);
+ EndpointInventory endpointInventory =
endpointInventoryCache.get(pagePathId);
+
+ ServicePageMetaInAlarm servicePageMetaInAlarm = new
ServicePageMetaInAlarm();
+ servicePageMetaInAlarm.setMetricsName(meta.getMetricsName());
+ servicePageMetaInAlarm.setServiceId(serviceId);
+ servicePageMetaInAlarm.setPagePathId(pagePathId);
+
+ String textName = endpointInventory.getName() + " in " +
serviceInventory.getName();
+ servicePageMetaInAlarm.setName(textName);
+ metaInAlarm = servicePageMetaInAlarm;
+ } else if (DefaultScopeDefine.inServiceVersionCatalog(scope)) {
+ String metricsId = meta.getId();
+ String[] ids = metricsId.split(Const.ID_SPLIT);
+ int serviceVersionId = Integer.parseInt(ids[0]);
+ int pagePathId = Integer.parseInt(ids[1]);
Review comment:
Same issue here about `id1`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services