Skip to content

Commit 5be22f2

Browse files
fix: Revert changes to istio and envoy (#2335)
* Revert changes to istio and envoy * Revert tests * Update tests * Update tests * Write new tests * Renove guid * Make conditions more specific --------- Co-authored-by: Adrian <[email protected]>
1 parent a4f1c95 commit 5be22f2

File tree

6 files changed

+326
-142
lines changed

6 files changed

+326
-142
lines changed

entity-types/ext-envoy/definition.stg.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@ synthesis:
77
separator: ":"
88
attributes:
99
- cluster_name
10-
- pod
10+
- gateway_envoyproxy_io_owning_gateway_name
1111
encodeIdentifierInGUID: true
12-
name: pod
12+
name: gateway_envoyproxy_io_owning_gateway_name
1313
conditions:
1414
- attribute: metricName
1515
prefix: envoy_
1616
- attribute: instrumentation.provider
17-
value: "prometheus"
17+
value: prometheus
1818
# otel
1919
- compositeIdentifier:
2020
separator: ":"
2121
attributes:
2222
- k8s.cluster.name
23-
- k8s.pod.name
23+
- k8s.pod.label.gateway.envoyproxy.io/owning-gateway-name
2424
encodeIdentifierInGUID: true
25-
name: k8s.pod.name
25+
name: k8s.pod.label.gateway.envoyproxy.io/owning-gateway-name
2626
conditions:
2727
- attribute: metricName
2828
prefix: envoy_
2929
- attribute: instrumentation.provider
30-
value: "opentelemetry"
30+
value: opentelemetry
3131

3232
tags:
3333
# prometheus
Lines changed: 9 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,21 @@
11
domain: EXT
22
type: ENVOY
3-
goldenTags:
4-
- k8s.clusterName
5-
- k8s.namespaceName
6-
73
synthesis:
84
rules:
9-
# prometheus
10-
- compositeIdentifier:
11-
separator: ":"
12-
attributes:
13-
- cluster_name
14-
- pod
5+
- identifier: host.hostname
6+
name: host.hostname
157
encodeIdentifierInGUID: true
16-
name: pod
178
conditions:
9+
- attribute: eventType
10+
value: Metric
1811
- attribute: metricName
19-
prefix: envoy_
20-
# otel
21-
- compositeIdentifier:
22-
separator: ":"
23-
attributes:
24-
- k8s.cluster.name
25-
- k8s.pod.name
26-
encodeIdentifierInGUID: true
27-
name: k8s.pod.name
28-
conditions:
29-
- attribute: metricName
30-
prefix: envoy_
31-
32-
tags:
33-
# prometheus
34-
cluster_name:
35-
entityTagName: k8s.clusterName
36-
ttl: P1D
37-
namespace:
38-
entityTagName: k8s.namespaceName
39-
ttl: P1D
40-
node:
41-
entityTagName: k8s.nodeName
42-
ttl: P1D
43-
pod:
44-
entityTagName: k8s.podName
45-
ttl: P1D
46-
47-
# otel
48-
k8s.cluster.name:
49-
entityTagName: k8s.clusterName
50-
ttl: P1D
51-
k8s.namespace.name:
52-
entityTagName: k8s.namespaceName
53-
ttl: P1D
54-
k8s.node.name:
55-
entityTagName: k8s.nodeName
56-
ttl: P1D
57-
k8s.pod.name:
58-
entityTagName: k8s.podName
59-
ttl: P1D
60-
12+
value: "envoy_http_downstream_cx_total"
13+
tags:
14+
ip:
15+
newrelic.agentVersion:
6116
dashboardTemplates:
62-
newRelic:
63-
template: dashboard.json
64-
prometheus:
17+
newrelic:
6518
template: dashboard.json
66-
6719
configuration:
6820
entityExpirationTime: EIGHT_DAYS
6921
alertable: true

entity-types/ext-envoy/tests/Metric.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"namespace": "envoy-gateway-system",
2626
"newrelic.source": "prometheusAPI",
2727
"node": "ip-10-0-63-169.us-west-1.compute.internal",
28+
"host.hostname": "ip-10-0-63-169.us-west-1.compute.internal",
2829
"pod": "envoy-default-eg-e41e7b31-56cbfb47d9-xw4zh",
2930
"pod_template_hash": "56cbfb47d9",
3031
"prometheus_server": "newrelic-prometheus-agent-0",
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
domain: EXT
2+
type: ISTIO_SERVICE
3+
goldenTags:
4+
- k8s.clusterName
5+
- k8s.namespaceName
6+
7+
synthesis:
8+
rules:
9+
# prometheus
10+
- compositeIdentifier:
11+
separator: ":"
12+
attributes:
13+
- cluster_name
14+
- service_istio_io_canonical_name
15+
encodeIdentifierInGUID: true
16+
name: service_istio_io_canonical_name
17+
conditions:
18+
- attribute: metricName
19+
prefix: istio_request
20+
- attribute: instrumentation.provider
21+
value: prometheus
22+
- compositeIdentifier:
23+
separator: ":"
24+
attributes:
25+
- cluster_name
26+
- service_istio_io_canonical_name
27+
encodeIdentifierInGUID: true
28+
name: service_istio_io_canonical_name
29+
conditions:
30+
- attribute: metricName
31+
prefix: istio_response
32+
- attribute: instrumentation.provider
33+
value: prometheus
34+
# otel
35+
- compositeIdentifier:
36+
separator: ":"
37+
attributes:
38+
- k8s.cluster.name
39+
- k8s.pod.label.service.istio.io/canonical-name
40+
encodeIdentifierInGUID: true
41+
name: k8s.pod.label.service.istio.io/canonical-name
42+
conditions:
43+
- attribute: metricName
44+
prefix: istio_request
45+
- attribute: instrumentation.provider
46+
value: opentelemetry
47+
- compositeIdentifier:
48+
separator: ":"
49+
attributes:
50+
- k8s.cluster.name
51+
- k8s.pod.label.service.istio.io/canonical-name
52+
encodeIdentifierInGUID: true
53+
name: k8s.pod.label.service.istio.io/canonical-name
54+
conditions:
55+
- attribute: metricName
56+
prefix: istio_response
57+
- attribute: instrumentation.provider
58+
value: opentelemetry
59+
60+
tags:
61+
# prometheus
62+
cluster_name:
63+
entityTagName: k8s.clusterName
64+
ttl: P1D
65+
deployment:
66+
entityTagName: k8s.deploymentName
67+
ttl: P1D
68+
namespace:
69+
entityTagName: k8s.namespaceName
70+
ttl: P1D
71+
pod:
72+
entityTagName: k8s.podName
73+
ttl: P1D
74+
75+
# otel
76+
k8s.cluster.name:
77+
entityTagName: k8s.clusterName
78+
ttl: P1D
79+
k8s.deployment.name:
80+
entityTagName: k8s.deploymentName
81+
ttl: P1D
82+
k8s.namespace.name:
83+
entityTagName: k8s.namespaceName
84+
ttl: P1D
85+
k8s.pod.name:
86+
entityTagName: k8s.podName
87+
ttl: P1D
88+
89+
service_istio_io_canonical_revision:
90+
app:
91+
version:
92+
label.istio:
93+
istio_io_rev:
94+
operator_istio_io_component:
95+
96+
dashboardTemplates:
97+
newRelic:
98+
template: dashboard.json
99+
prometheus:
100+
template: dashboard.json
101+
opentelemetry:
102+
template: opentelemetry_dashboard.json
103+
104+
configuration:
105+
entityExpirationTime: FOUR_HOURS
106+
alertable: true

0 commit comments

Comments
 (0)