Skip to content

Commit

Permalink
fix/to: fix virtualServiceMeta.ftl t_virtual_service_stats
Browse files Browse the repository at this point in the history
  • Loading branch information
trickMin committed Jan 3, 2023
1 parent 6291b9f commit 84e03df
Showing 1 changed file with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ metadata:
</#if>

<#if t_virtual_service_stats?has_content>
proxy.filters.http.detailed_stats:
stats:
<#list t_virtual_service_stats as stats_meta>
- ${stats_meta}
proxy.metadata_stats.detailed_stats:
stat_prefix: detailed_route
stat_tags:
<#list t_virtual_service_stats?keys as tagKey>
- key: "${tagKey}"
val: "${t_virtual_service_stats[tagKey]}"
</#list>
</#if>

Expand All @@ -36,37 +38,37 @@ metadata:
resp_exception_code: ${t_virtual_service_resp_exception_code}
</#if>
context:
service: ${t_virtual_service_dubbo_meta_service}
version: ${t_virtual_service_dubbo_meta_version}
method: ${t_virtual_service_dubbo_meta_method}
group: ${t_virtual_service_dubbo_meta_group}
service: "${t_virtual_service_dubbo_meta_service?j_string}"
version: "${t_virtual_service_dubbo_meta_version?j_string}"
method: "${t_virtual_service_dubbo_meta_method?j_string}"
group: "${t_virtual_service_dubbo_meta_group?j_string}"
source: ${(t_virtual_service_dubbo_meta_source=="body")?string('HTTP_BODY','HTTP_QUERY')}
<#if t_virtual_service_dubbo_meta_params?has_content>
parameters:
<#list t_virtual_service_dubbo_meta_params as p>
- type: ${p.value}
name: ${p.key}
- type: "${p.value?j_string}"
name: "${p.key?j_string}"
required: ${p.required?c}
<#if p.defaultValue ??>
default: '${p.defaultJsonValue}'
</#if>
<#if p.genericMap?has_content>
generic:
<#list p.genericMap as k,v>
- path: ${k}
type: ${v}
- path: "${k?j_string}"
type: "${v?j_string}"
</#list>
</#if>
</#list>
</#if>
<#if t_virtual_service_dubbo_meta_attachments?has_content>
attachments:
<#list t_virtual_service_dubbo_meta_attachments as a>
- name: ${a.serverParamName}
- name: "${a.serverParamName?j_string}"
<#if a.paramPosition == "Header">
header: ${a.clientParamName}
header: "${a.clientParamName?j_string}"
<#elseif a.paramPosition == "Cookie">
cookie: ${a.clientParamName}
cookie: "${a.clientParamName?j_string}"
</#if>
</#list>
</#if>
Expand Down

0 comments on commit 84e03df

Please sign in to comment.