-
Notifications
You must be signed in to change notification settings - Fork 704
/
recommendation_requestcount.yml
44 lines (44 loc) · 1.15 KB
/
recommendation_requestcount.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
apiVersion: "config.istio.io/v1alpha2"
kind: instance
metadata:
name: recommendationrequestcount
spec:
compiledTemplate: metric
params:
value: "1"
dimensions:
source: source.service | "unknown"
destination: destination.service | "unknown"
version: destination.labels["version"] | "unknown"
user_agent: request.headers["user-agent"] | "unknown"
monitored_resource_type: '"UNSPECIFIED"'
---
apiVersion: "config.istio.io/v1alpha2"
kind: handler
metadata:
name: recommendationrequestcounthandler
namespace: istio-system
spec:
compiledAdapter: prometheus
params:
metrics:
- name: recommendation_request_count
instance_name: recommendationrequestcount.metric.istio-system
kind: COUNTER
label_names:
- source
- destination
- user_agent
- version
---
apiVersion: "config.istio.io/v1alpha2"
kind: rule
metadata:
name: recommendationrequestcountprom
namespace: istio-system
spec:
match: destination.service == "recommendation.tutorial.svc.cluster.local"
actions:
- handler: recommendationrequestcounthandler.prometheus
instances:
- recommendationrequestcount.metric