传递给 <code>prometheus</code> 处理程序。</p><pre><code class=language-yaml data-expandlinks=true data-repo=istio>apiVersion: config.istio.io/v1alpha2
kind: rule
metadata:
  name: promhttp
  namespace: istio-system
spec:
  match: destination.service.host == &#34;service1.ns.svc.cluster.local&#34; &amp;&amp; request.headers[&#34;x-user&#34;] == &#34;user1&#34;
  actions:
  - handler: promhandler
    instances: [ requestduration ]
</code></pre><p>Rule 包含 <code>match</code> 条件表达式和条件