Skip to content

Commit

Permalink
fix: 修复调用分析模调指标类型探测偶现不准确的问题 --bug=134730191 (#4136)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhuoZhuoCrayon authored Nov 29, 2024
1 parent a570356 commit fa6973a
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions bkmonitor/packages/apm_web/handlers/metric_group/groups/trpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from django.db.models import Q

from apm_web.metric.constants import SeriesAliasType
from bkmonitor.data_source import dict_to_q
from bkmonitor.data_source import dict_to_q, q_to_dict
from bkmonitor.data_source.unify_query.builder import QueryConfigBuilder, UnifyQuerySet
from constants.apm import MetricTemporality, TRPCMetricTag

Expand Down Expand Up @@ -282,22 +282,18 @@ def get_server_config(
{
"metric_field": TRPCMetricField.RPC_CLIENT_HANDLED_TOTAL,
"field": TRPCMetricTag.APP,
"filter_dict": {f"{TRPCMetricTag.CALLER_SERVER}__eq": server},
"filter_dict": q_to_dict(
Q(**{f"{TRPCMetricTag.CALLER_SERVER}__eq": server})
| Q(**{f"{TRPCMetricTag.SERVICE_NAME}__eq": server})
),
},
{
"metric_field": TRPCMetricField.RPC_SERVER_HANDLED_TOTAL,
"field": TRPCMetricTag.APP,
"filter_dict": {f"{TRPCMetricTag.CALLEE_SERVER}__eq": server},
},
{
"metric_field": TRPCMetricField.RPC_CLIENT_HANDLED_TOTAL,
"field": TRPCMetricTag.APP,
"filter_dict": {f"{TRPCMetricTag.SERVICE_NAME}__eq": server},
},
{
"metric_field": TRPCMetricField.RPC_SERVER_HANDLED_TOTAL,
"field": TRPCMetricTag.APP,
"filter_dict": {f"{TRPCMetricTag.SERVICE_NAME}__eq": server},
"filter_dict": q_to_dict(
Q(**{f"{TRPCMetricTag.CALLEE_SERVER}__eq": server})
| Q(**{f"{TRPCMetricTag.SERVICE_NAME}__eq": server})
),
},
],
start_time=start_time,
Expand Down

0 comments on commit fa6973a

Please sign in to comment.