Skip to content

Commit f8e222e

Browse files
authored
fix: links in the condition messages (#2714)
1 parent b17d9db commit f8e222e

File tree

8 files changed

+60
-50
lines changed

8 files changed

+60
-50
lines changed

internal/conditions/conditions.go

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ package conditions
22

33
import "strings"
44

5+
const (
6+
LinkNoDataArriveAtBackend = "https://kyma-project.io/external-content/telemetry-manager/docs/user/troubleshooting.html#no-data-arrive-at-the-backend"
7+
LinkNotAllDataArriveAtBackend = "https://kyma-project.io/external-content/telemetry-manager/docs/user/troubleshooting.html#not-all-data-arrive-at-the-backend"
8+
LinkGatewayThrottling = "https://kyma-project.io/external-content/telemetry-manager/docs/user/troubleshooting.html#gateway-throttling"
9+
10+
LinkFluentBitNoLogsArriveAtBackend = "https://kyma-project.io/#/telemetry-manager/user/02-logs?id=no-logs-arrive-at-the-backend"
11+
LinkFluentBitNotAllLogsArriveAtBackend = "https://kyma-project.io/#/telemetry-manager/user/02-logs?id=not-all-logs-arrive-at-the-backend"
12+
LinkFluenBitBufferFillingUp = "https://kyma-project.io/#/telemetry-manager/user/02-logs?id=agent-buffer-filling-up"
13+
)
14+
515
const (
616
TypeAgentHealthy = "AgentHealthy"
717
TypeConfigurationGenerated = "ConfigurationGenerated"
@@ -86,11 +96,11 @@ var commonLogPipelineMessages = map[string]string{
8696
var fluentBitLogPipelineMessages = map[string]string{
8797
ReasonEndpointInvalid: "HTTP output host invalid: %s",
8898

89-
ReasonSelfMonAgentAllDataDropped: "Backend is not reachable or rejecting logs. All logs are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=no-logs-arrive-at-the-backend",
90-
ReasonSelfMonAgentBufferFillingUp: "Buffer nearing capacity. Incoming log rate exceeds export rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=agent-buffer-filling-up",
99+
ReasonSelfMonAgentAllDataDropped: "Backend is not reachable or rejecting logs. All logs are dropped. See troubleshooting: " + LinkFluentBitNoLogsArriveAtBackend,
100+
ReasonSelfMonAgentBufferFillingUp: "Buffer nearing capacity. Incoming log rate exceeds export rate. See troubleshooting: " + LinkFluenBitBufferFillingUp,
91101
ReasonSelfMonConfigNotGenerated: "No logs delivered to backend because LogPipeline specification is not applied to the configuration of Log agent. Check the 'ConfigurationGenerated' condition for more details",
92-
ReasonSelfMonAgentNoLogsDelivered: "Backend is not reachable or rejecting logs. Logs are buffered and not yet dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=no-logs-arrive-at-the-backend",
93-
ReasonSelfMonAgentSomeDataDropped: "Backend is reachable, but rejecting logs. Some logs are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=not-all-logs-arrive-at-the-backend",
102+
ReasonSelfMonAgentNoLogsDelivered: "Backend is not reachable or rejecting logs. Logs are buffered and not yet dropped. See troubleshooting: " + LinkFluentBitNoLogsArriveAtBackend,
103+
ReasonSelfMonAgentSomeDataDropped: "Backend is reachable, but rejecting logs. Some logs are dropped. See troubleshooting: " + LinkFluentBitNotAllLogsArriveAtBackend,
94104
}
95105

96106
var otelLogPipelineMessages = map[string]string{
@@ -100,11 +110,11 @@ var otelLogPipelineMessages = map[string]string{
100110
ReasonGatewayNotReady: "Log gateway Deployment is not ready",
101111
ReasonGatewayReady: "Log gateway Deployment is ready",
102112

103-
ReasonSelfMonGatewayAllDataDropped: "Backend is not reachable or rejecting logs. All logs are dropped in Log gateway. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=no-logs-arrive-at-the-backend",
104-
ReasonSelfMonAgentAllDataDropped: "Backend is not reachable or rejecting logs. All logs are dropped in Log agent. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=no-logs-arrive-at-the-backend",
105-
ReasonSelfMonGatewaySomeDataDropped: "Backend is reachable, but rejecting logs. Some logs are dropped in Log gateway. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=not-all-logs-arrive-at-the-backend",
106-
ReasonSelfMonAgentSomeDataDropped: "Backend is reachable, but rejecting logs. Some logs are dropped in Log agent. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=not-all-logs-arrive-at-the-backend",
107-
ReasonSelfMonGatewayThrottling: "Log gateway is unable to receive logs at current rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=gateway-throttling",
113+
ReasonSelfMonGatewayAllDataDropped: "Backend is not reachable or rejecting logs. All logs are dropped in Log gateway. See troubleshooting: " + LinkNoDataArriveAtBackend,
114+
ReasonSelfMonAgentAllDataDropped: "Backend is not reachable or rejecting logs. All logs are dropped in Log agent. See troubleshooting: " + LinkNoDataArriveAtBackend,
115+
ReasonSelfMonGatewaySomeDataDropped: "Backend is reachable, but rejecting logs. Some logs are dropped in Log gateway. See troubleshooting: " + LinkNotAllDataArriveAtBackend,
116+
ReasonSelfMonAgentSomeDataDropped: "Backend is reachable, but rejecting logs. Some logs are dropped in Log agent. See troubleshooting: " + LinkNotAllDataArriveAtBackend,
117+
ReasonSelfMonGatewayThrottling: "Log gateway is unable to receive logs at current rate. See troubleshooting: " + LinkGatewayThrottling,
108118
ReasonSelfMonConfigNotGenerated: "No logs delivered to backend because LogPipeline specification is not applied to the configuration of Log agent and Log gateway. Check the 'ConfigurationGenerated' condition for more details",
109119
}
110120

@@ -114,10 +124,10 @@ var tracePipelineMessages = map[string]string{
114124
ReasonGatewayConfigured: "TracePipeline specification is successfully applied to the configuration of Trace gateway",
115125
ReasonGatewayNotReady: "Trace gateway Deployment is not ready",
116126
ReasonGatewayReady: "Trace gateway Deployment is ready",
117-
ReasonSelfMonGatewayAllDataDropped: "Backend is not reachable or rejecting spans. All spans are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=no-spans-arrive-at-the-backend",
127+
ReasonSelfMonGatewayAllDataDropped: "Backend is not reachable or rejecting spans. All spans are dropped. See troubleshooting: " + LinkNoDataArriveAtBackend,
118128
ReasonSelfMonConfigNotGenerated: "No spans delivered to backend because TracePipeline specification is not applied to the configuration of Trace gateway. Check the 'ConfigurationGenerated' condition for more details",
119-
ReasonSelfMonGatewayThrottling: "Trace gateway is unable to receive spans at current rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=gateway-throttling",
120-
ReasonSelfMonGatewaySomeDataDropped: "Backend is reachable, but rejecting spans. Some spans are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=not-all-spans-arrive-at-the-backend",
129+
ReasonSelfMonGatewayThrottling: "Trace gateway is unable to receive spans at current rate. See troubleshooting: " + LinkGatewayThrottling,
130+
ReasonSelfMonGatewaySomeDataDropped: "Backend is reachable, but rejecting spans. Some spans are dropped. See troubleshooting: " + LinkNotAllDataArriveAtBackend,
121131
}
122132

123133
var metricPipelineMessages = map[string]string{
@@ -128,12 +138,12 @@ var metricPipelineMessages = map[string]string{
128138
ReasonGatewayConfigured: "MetricPipeline specification is successfully applied to the configuration of Metric gateway",
129139
ReasonGatewayNotReady: "Metric gateway Deployment is not ready",
130140
ReasonGatewayReady: "Metric gateway Deployment is ready",
131-
ReasonSelfMonGatewayAllDataDropped: "Backend is not reachable or rejecting metrics. All metrics are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/04-metrics?id=no-metrics-arrive-at-the-backend",
132-
ReasonSelfMonAgentAllDataDropped: "Backend is not reachable or rejecting metrics. All metrics are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/04-metrics?id=no-metrics-arrive-at-the-backend",
141+
ReasonSelfMonGatewayAllDataDropped: "Backend is not reachable or rejecting metrics. All metrics are dropped. See troubleshooting: " + LinkNoDataArriveAtBackend,
142+
ReasonSelfMonAgentAllDataDropped: "Backend is not reachable or rejecting metrics. All metrics are dropped. See troubleshooting: " + LinkNoDataArriveAtBackend,
133143
ReasonSelfMonConfigNotGenerated: "No metrics delivered to backend because MetricPipeline specification is not applied to the configuration of Metric gateway. Check the 'ConfigurationGenerated' condition for more details",
134-
ReasonSelfMonGatewayThrottling: "Metric gateway is unable to receive metrics at current rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/04-metrics?id=gateway-throttling",
135-
ReasonSelfMonGatewaySomeDataDropped: "Backend is reachable, but rejecting metrics. Some metrics are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/04-metrics?id=not-all-metrics-arrive-at-the-backend",
136-
ReasonSelfMonAgentSomeDataDropped: "Backend is reachable, but rejecting metrics. Some metrics are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/04-metrics?id=not-all-metrics-arrive-at-the-backend",
144+
ReasonSelfMonGatewayThrottling: "Metric gateway is unable to receive metrics at current rate. See troubleshooting: " + LinkGatewayThrottling,
145+
ReasonSelfMonGatewaySomeDataDropped: "Backend is reachable, but rejecting metrics. Some metrics are dropped. See troubleshooting: " + LinkNotAllDataArriveAtBackend,
146+
ReasonSelfMonAgentSomeDataDropped: "Backend is reachable, but rejecting metrics. Some metrics are dropped. See troubleshooting: " + LinkNotAllDataArriveAtBackend,
137147
}
138148

139149
func MessageForOtelLogPipeline(reason string) string {

internal/reconciler/logpipeline/fluentbit/reconciler_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ func TestFlowHealthCondition(t *testing.T) {
436436
},
437437
expectedStatus: metav1.ConditionFalse,
438438
expectedReason: conditions.ReasonSelfMonAgentBufferFillingUp,
439-
expectedMsg: "Buffer nearing capacity. Incoming log rate exceeds export rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=agent-buffer-filling-up",
439+
expectedMsg: "Buffer nearing capacity. Incoming log rate exceeds export rate. See troubleshooting: " + conditions.LinkFluenBitBufferFillingUp,
440440
},
441441
{
442442
name: "no logs delivered",
@@ -445,7 +445,7 @@ func TestFlowHealthCondition(t *testing.T) {
445445
},
446446
expectedStatus: metav1.ConditionFalse,
447447
expectedReason: conditions.ReasonSelfMonAgentNoLogsDelivered,
448-
expectedMsg: "Backend is not reachable or rejecting logs. Logs are buffered and not yet dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=no-logs-arrive-at-the-backend",
448+
expectedMsg: "Backend is not reachable or rejecting logs. Logs are buffered and not yet dropped. See troubleshooting: " + conditions.LinkFluentBitNoLogsArriveAtBackend,
449449
},
450450
{
451451
name: "no logs delivered shadows other problems",
@@ -455,7 +455,7 @@ func TestFlowHealthCondition(t *testing.T) {
455455
},
456456
expectedStatus: metav1.ConditionFalse,
457457
expectedReason: conditions.ReasonSelfMonAgentNoLogsDelivered,
458-
expectedMsg: "Backend is not reachable or rejecting logs. Logs are buffered and not yet dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=no-logs-arrive-at-the-backend",
458+
expectedMsg: "Backend is not reachable or rejecting logs. Logs are buffered and not yet dropped. See troubleshooting: " + conditions.LinkFluentBitNoLogsArriveAtBackend,
459459
},
460460
{
461461
name: "some data dropped",
@@ -464,7 +464,7 @@ func TestFlowHealthCondition(t *testing.T) {
464464
},
465465
expectedStatus: metav1.ConditionFalse,
466466
expectedReason: conditions.ReasonSelfMonAgentSomeDataDropped,
467-
expectedMsg: "Backend is reachable, but rejecting logs. Some logs are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=not-all-logs-arrive-at-the-backend",
467+
expectedMsg: "Backend is reachable, but rejecting logs. Some logs are dropped. See troubleshooting: " + conditions.LinkFluentBitNotAllLogsArriveAtBackend,
468468
},
469469
{
470470
name: "some data dropped shadows other problems",
@@ -474,7 +474,7 @@ func TestFlowHealthCondition(t *testing.T) {
474474
},
475475
expectedStatus: metav1.ConditionFalse,
476476
expectedReason: conditions.ReasonSelfMonAgentSomeDataDropped,
477-
expectedMsg: "Backend is reachable, but rejecting logs. Some logs are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=not-all-logs-arrive-at-the-backend",
477+
expectedMsg: "Backend is reachable, but rejecting logs. Some logs are dropped. See troubleshooting: " + conditions.LinkFluentBitNotAllLogsArriveAtBackend,
478478
},
479479
{
480480
name: "all data dropped",
@@ -483,7 +483,7 @@ func TestFlowHealthCondition(t *testing.T) {
483483
},
484484
expectedStatus: metav1.ConditionFalse,
485485
expectedReason: conditions.ReasonSelfMonAgentAllDataDropped,
486-
expectedMsg: "Backend is not reachable or rejecting logs. All logs are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=no-logs-arrive-at-the-backend",
486+
expectedMsg: "Backend is not reachable or rejecting logs. All logs are dropped. See troubleshooting: " + conditions.LinkFluentBitNoLogsArriveAtBackend,
487487
},
488488
{
489489
name: "all data dropped shadows other problems",
@@ -495,7 +495,7 @@ func TestFlowHealthCondition(t *testing.T) {
495495
},
496496
expectedStatus: metav1.ConditionFalse,
497497
expectedReason: conditions.ReasonSelfMonAgentAllDataDropped,
498-
expectedMsg: "Backend is not reachable or rejecting logs. All logs are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=no-logs-arrive-at-the-backend",
498+
expectedMsg: "Backend is not reachable or rejecting logs. All logs are dropped. See troubleshooting: " + conditions.LinkFluentBitNoLogsArriveAtBackend,
499499
},
500500
}
501501

internal/reconciler/logpipeline/otel/reconciler_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func TestGatewayFlowHealthCondition(t *testing.T) {
150150
},
151151
expectedStatus: metav1.ConditionFalse,
152152
expectedReason: conditions.ReasonSelfMonGatewayThrottling,
153-
expectedMessage: "Log gateway is unable to receive logs at current rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=gateway-throttling",
153+
expectedMessage: "Log gateway is unable to receive logs at current rate. See troubleshooting: " + conditions.LinkGatewayThrottling,
154154
},
155155
{
156156
name: "some data dropped",
@@ -159,7 +159,7 @@ func TestGatewayFlowHealthCondition(t *testing.T) {
159159
},
160160
expectedStatus: metav1.ConditionFalse,
161161
expectedReason: conditions.ReasonSelfMonGatewaySomeDataDropped,
162-
expectedMessage: "Backend is reachable, but rejecting logs. Some logs are dropped in Log gateway. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=not-all-logs-arrive-at-the-backend",
162+
expectedMessage: "Backend is reachable, but rejecting logs. Some logs are dropped in Log gateway. See troubleshooting: " + conditions.LinkNotAllDataArriveAtBackend,
163163
},
164164
{
165165
name: "some data dropped shadows other problems",
@@ -169,7 +169,7 @@ func TestGatewayFlowHealthCondition(t *testing.T) {
169169
},
170170
expectedStatus: metav1.ConditionFalse,
171171
expectedReason: conditions.ReasonSelfMonGatewaySomeDataDropped,
172-
expectedMessage: "Backend is reachable, but rejecting logs. Some logs are dropped in Log gateway. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=not-all-logs-arrive-at-the-backend",
172+
expectedMessage: "Backend is reachable, but rejecting logs. Some logs are dropped in Log gateway. See troubleshooting: " + conditions.LinkNotAllDataArriveAtBackend,
173173
},
174174
{
175175
name: "all data dropped",
@@ -178,7 +178,7 @@ func TestGatewayFlowHealthCondition(t *testing.T) {
178178
},
179179
expectedStatus: metav1.ConditionFalse,
180180
expectedReason: conditions.ReasonSelfMonGatewayAllDataDropped,
181-
expectedMessage: "Backend is not reachable or rejecting logs. All logs are dropped in Log gateway. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=no-logs-arrive-at-the-backend",
181+
expectedMessage: "Backend is not reachable or rejecting logs. All logs are dropped in Log gateway. See troubleshooting: " + conditions.LinkNoDataArriveAtBackend,
182182
},
183183
{
184184
name: "all data dropped shadows other problems",
@@ -188,7 +188,7 @@ func TestGatewayFlowHealthCondition(t *testing.T) {
188188
},
189189
expectedStatus: metav1.ConditionFalse,
190190
expectedReason: conditions.ReasonSelfMonGatewayAllDataDropped,
191-
expectedMessage: "Backend is not reachable or rejecting logs. All logs are dropped in Log gateway. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=no-logs-arrive-at-the-backend",
191+
expectedMessage: "Backend is not reachable or rejecting logs. All logs are dropped in Log gateway. See troubleshooting: " + conditions.LinkNoDataArriveAtBackend,
192192
},
193193
}
194194
for _, tt := range tests {
@@ -246,7 +246,7 @@ func TestAgentFlowHealthCondition(t *testing.T) {
246246
},
247247
expectedStatus: metav1.ConditionFalse,
248248
expectedReason: conditions.ReasonSelfMonAgentSomeDataDropped,
249-
expectedMessage: "Backend is reachable, but rejecting logs. Some logs are dropped in Log agent. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=not-all-logs-arrive-at-the-backend",
249+
expectedMessage: "Backend is reachable, but rejecting logs. Some logs are dropped in Log agent. See troubleshooting: " + conditions.LinkNotAllDataArriveAtBackend,
250250
},
251251
{
252252
name: "all data dropped",
@@ -255,7 +255,7 @@ func TestAgentFlowHealthCondition(t *testing.T) {
255255
},
256256
expectedStatus: metav1.ConditionFalse,
257257
expectedReason: conditions.ReasonSelfMonAgentAllDataDropped,
258-
expectedMessage: "Backend is not reachable or rejecting logs. All logs are dropped in Log agent. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=no-logs-arrive-at-the-backend",
258+
expectedMessage: "Backend is not reachable or rejecting logs. All logs are dropped in Log agent. See troubleshooting: " + conditions.LinkNoDataArriveAtBackend,
259259
},
260260
{
261261
name: "all data dropped shadows other problems",
@@ -264,7 +264,7 @@ func TestAgentFlowHealthCondition(t *testing.T) {
264264
},
265265
expectedStatus: metav1.ConditionFalse,
266266
expectedReason: conditions.ReasonSelfMonAgentAllDataDropped,
267-
expectedMessage: "Backend is not reachable or rejecting logs. All logs are dropped in Log agent. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/logs?id=no-logs-arrive-at-the-backend",
267+
expectedMessage: "Backend is not reachable or rejecting logs. All logs are dropped in Log agent. See troubleshooting: " + conditions.LinkNoDataArriveAtBackend,
268268
},
269269
}
270270
for _, tt := range tests {

0 commit comments

Comments
 (0)