Skip to content

Commit 4393f16

Browse files
TT-10821: add support for analytics on MDCB (#242)
* TT-10821: add supoort for analytics on MDCB * TT-10821: remove env from pump * TT-10821: add values to umbrella chart * TT-10821: rebase with main * TT-10821: uncomment redis pass
1 parent 115d297 commit 4393f16

File tree

7 files changed

+65
-6
lines changed

7 files changed

+65
-6
lines changed

components/tyk-mdcb/templates/deployment-mdcb.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,23 @@ spec:
141141
{{- end }}
142142
- name: TYK_MDCB_FORWARDANALYTICSTOPUMP
143143
value: "{{ .Values.mdcb.forwardAnalyticsToPump }}"
144+
- name: TYK_MDCB_ENABLEMULTIPLEANALYTICSKEYS
145+
value: "{{ .Values.mdcb.enableMultipleAnalyticsKey }}"
146+
- name: TYK_MDCB_DONTSTORESELECTIVE
147+
value: "{{ .Values.mdcb.dontStoreSelective }}"
148+
- name: TYK_MDCB_DONTSTOREAGGREGATES
149+
value: "{{ .Values.mdcb.dontStoreAggregate }}"
150+
{{- if .Values.mdcb.ignoreTagPrefixList }}
151+
- name: TYK_MDCB_IGNORETAGPREFIXLIST
152+
value: |
153+
{{- range .Values.mdcb.ignoreTagPrefixList }}
154+
{{ . }}
155+
{{- end }}
156+
{{- end }}
157+
- name: TYK_MDCB_TRACKALLPATHS
158+
value: "{{ .Values.mdcb.trackAllPaths }}"
159+
- name: TYK_MDCB_STOREANALYTICSPERMINUTE
160+
value: "{{ .Values.mdcb.storeAnalyticsPerMinute }}"
144161
- name: TYK_MDCB_LICENSE
145162
valueFrom:
146163
secretKeyRef:

components/tyk-mdcb/values.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,28 @@ mdcb:
162162
# MDCB can send analytics to Redis. This will allow tyk-pump to pull
163163
# analytics from Redis and send to your own data sinks.
164164
# It is used to set TYK_MDCB_FORWARDANALYTICSTOPUMP
165-
forwardAnalyticsToPump: true
165+
forwardAnalyticsToPump: false
166+
167+
# This enables saving analytics in multiple keys as oppose to just having one.
168+
# It is useful when using a Redis cluster.
169+
# It also only works when TYK_MDCB_FORWARDANALYTICSTOPUMP is set to true.
170+
enableMultipleAnalyticsKey: true
171+
172+
# This should be set to true if you choose not to store selective analytics
173+
dontStoreSelective: false
174+
175+
# This should be set to true if you choose not to store aggregate analytics
176+
dontStoreAggregate: false
177+
178+
# If set to true then it will not store analytics for tags having prefix specified in the list.
179+
# NB: Prefix “key-” is added in the list by default. This tag is added by gateway for keys.
180+
ignoreTagPrefixList: []
181+
182+
# If enabled, it will store analytics for all the endpoints, irrespective of Track Endpoint plugin.
183+
trackAllPaths: false
184+
185+
# If enabled, aggregate data will be generated per minute.
186+
storeAnalyticsPerMinute: false
166187

167188
probes:
168189
# This port lets MDCB allow standard health checks.

components/tyk-pump/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ to it in the `global.remoteControlPlane.useSecretName` field.
206206
# hybridPump configures Tyk Pump to forward Tyk metrics to a Tyk Control Plane.
207207
# Please add "hybrid" to .Values.pump.backend in order to enable Hybrid Pump.
208208
hybridPump:
209-
# Specify the frequency of the aggregation in minutes or simply turn it on by setting it to true
209+
# Send aggregated analytics data to Tyk MDCB
210210
enableAggregateAnalytics: true
211211
# Hybrid pump RPC calls timeout in seconds. If not specified, default value will be picked up by Tyk Pump.
212212
callTimeout: 10

components/tyk-pump/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ pump:
242242
# hybridPump configures Tyk Pump to forward Tyk metrics to a Tyk Control Plane.
243243
# Please add "hybrid" to .Values.pump.backend in order to enable Hybrid Pump.
244244
hybridPump:
245-
# Specify the frequency of the aggregation in minutes or simply turn it on by setting it to true
245+
# This wiil allow tyk-pump to pull analytics from Redis and send to your own data sinks.
246246
enableAggregateAnalytics: true
247247
# Hybrid pump RPC calls timeout in seconds. If not specified, default value will be picked up by Tyk Pump.
248248
callTimeout: 10

tyk-control-plane/values.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,28 @@ tyk-mdcb:
10501050
# MDCB can send analytics to Redis. This will allow tyk-pump to pull
10511051
# analytics from Redis and send to your own data sinks.
10521052
# It is used to set TYK_MDCB_FORWARDANALYTICSTOPUMP
1053-
forwardAnalyticsToPump: true
1053+
forwardAnalyticsToPump: false
1054+
1055+
# This enables saving analytics in multiple keys as oppose to just having one.
1056+
# It is useful when using a Redis cluster.
1057+
# It also only works when TYK_MDCB_FORWARDANALYTICSTOPUMP is set to true.
1058+
enableMultipleAnalyticsKey: true
1059+
1060+
# This should be set to true if you choose not to store selective analytics
1061+
dontStoreSelective: false
1062+
1063+
# This should be set to true if you choose not to store aggregate analytics
1064+
dontStoreAggregate: false
1065+
1066+
# If set to true then it will not store analytics for tags having prefix specified in the list.
1067+
# NB: Prefix “key-” is added in the list by default. This tag is added by gateway for keys.
1068+
ignoreTagPrefixList: []
1069+
1070+
# If enabled, it will store analytics for all the endpoints, irrespective of Track Endpoint plugin.
1071+
trackAllPaths: false
1072+
1073+
# If enabled, aggregate data will be generated per minute.
1074+
storeAnalyticsPerMinute: true
10541075

10551076
probes:
10561077
# This port lets MDCB allow standard health checks.

tyk-data-plane/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Add `hybrid` to `tyk-pump.pump.backend`, and add remoteControlPlane details unde
418418
# hybridPump configures Tyk Pump to forward Tyk metrics to a Tyk Control Plane.
419419
# Please add "hybrid" to .Values.pump.backend in order to enable Hybrid Pump.
420420
hybridPump:
421-
# Specify the frequency of the aggregation in minutes or simply turn it on by setting it to true
421+
# Send aggregated analytics data to Tyk MDCB
422422
enableAggregateAnalytics: true
423423
# Hybrid pump RPC calls timeout in seconds.
424424
callTimeout: 10

tyk-data-plane/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ tyk-pump:
550550
# hybridPump configures Tyk Pump to forward Tyk metrics to a Tyk Control Plane.
551551
# Please add "hybrid" to .Values.pump.backend in order to enable Hybrid Pump.
552552
hybridPump:
553-
# Specify the frequency of the aggregation in minutes or simply turn it on by setting it to true
553+
# Send aggregated analytics data to Tyk MDCB
554554
enableAggregateAnalytics: true
555555
# Hybrid pump RPC calls timeout in seconds. If not specified, default value will be picked up by Tyk Pump.
556556
callTimeout: 10

0 commit comments

Comments
 (0)