You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -243,6 +243,45 @@ Apply the provided example resource for telemetry-controller: [telemetry-control
243
243
kubectl apply -f telemetry-controller.yaml
244
244
```
245
245
246
+
## Testing and Debugging
247
+
248
+
### Dry Run Mode
249
+
250
+
The Telemetry Controller supports a `dryRunMode` flag in the Collector CRD that enables a simplified pipeline configuration for testing and debugging purposes.
251
+
252
+
To enable dry run mode, set both `debug` and `dryRunMode` in your Collector resource:
253
+
254
+
```yaml
255
+
apiVersion: telemetry.kube-logging.dev/v1alpha1
256
+
kind: Collector
257
+
metadata:
258
+
name: example-collector
259
+
spec:
260
+
debug: true
261
+
dryRunMode: true
262
+
tenantSelector:
263
+
matchLabels:
264
+
example: "true"
265
+
```
266
+
267
+
When `dryRunMode` is enabled, the generated OpenTelemetry Collector pipeline is simplified:
268
+
269
+
- Only data-modifying components are included (e.g., transform processors, k8sattributes processor)
270
+
- All exporters except the debug exporter are disabled
271
+
- Persistence options are disabled
272
+
273
+
This feature is particularly useful for:
274
+
275
+
- **Testing new processor configurations in isolation** - Verify that your data transformations work correctly without sending data to production backends
276
+
- **Validating data transformations before production deployment** - See exactly how your telemetry data is being modified
277
+
- **Inspecting telemetry pipelines** - Examine the data flow without affecting production exporters or generating unnecessary traffic
278
+
279
+
To view the debug output, check the collector logs:
Telemetry Controller uses a [custom OpenTelemetry Collector distribution](https://github.com/axoflow/axoflow-otel-collector-releases) as its agent. This distribution is and will be compatible with the upstream OpenTelemetry Collector distribution regarding core features, but:
// +kubebuilder:validation:XValidation:rule="!has(self.dryRunMode) || !self.dryRunMode || (has(self.debug) && self.debug)",message="dryRunMode can only be set to true when debug is explicitly set to true"
54
+
53
55
// CollectorSpec defines the desired state of Collector
54
56
typeCollectorSpecstruct {
55
57
// +kubebuilder:validation:Required
@@ -64,7 +66,11 @@ type CollectorSpec struct {
64
66
ControlNamespacestring`json:"controlNamespace"`
65
67
66
68
// Enables debug logging for the collector.
67
-
Debugbool`json:"debug,omitempty"`
69
+
Debug*bool`json:"debug,omitempty"`
70
+
71
+
// DryRunMode disables all exporters except for the debug exporter, as well as persistence options configured for the collector.
72
+
// This can be useful for testing and debugging purposes.
73
+
DryRunMode*bool`json:"dryRunMode,omitempty"`
68
74
69
75
// Setting memory limits for the Collector using the memory limiter processor.
0 commit comments