@@ -53,29 +53,39 @@ type Telemetry struct {
53
53
//
54
54
// +optional
55
55
// +kubebuilder:validation:MaxProperties=64
56
- SpanAttributes map [string ]string `json:"spanAttributes,omitempty"`
56
+ SpanAttributes map [string ]AttributeValue `json:"spanAttributes,omitempty"`
57
57
}
58
58
59
59
// TelemetryExporter specifies OpenTelemetry export parameters.
60
60
type TelemetryExporter struct {
61
- // Interval is the maximum interval between two exports, by default is 5 seconds.
61
+ // Interval is the maximum interval between two exports.
62
+ // Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter
62
63
//
63
64
// +optional
64
65
Interval * Duration `json:"interval,omitempty"`
65
66
66
- // BatchSize is the maximum number of spans to be sent in one batch per worker, by default is 512.
67
+ // BatchSize is the maximum number of spans to be sent in one batch per worker.
68
+ // Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter
67
69
//
68
70
// +optional
69
71
// +kubebuilder:validation:Minimum=0
70
72
BatchSize * int32 `json:"batchSize,omitempty"`
71
73
72
- // BatchCount is the number of pending batches per worker, spans exceeding the limit are dropped,
73
- // by default is 4.
74
+ // BatchCount is the number of pending batches per worker, spans exceeding the limit are dropped.
75
+ // Default: https://nginx.org/en/docs/ngx_otel_module.html#otel_exporter
74
76
//
75
77
// +optional
76
78
// +kubebuilder:validation:Minimum=0
77
79
BatchCount * int32 `json:"batchCount,omitempty"`
78
80
79
81
// Endpoint is the address of OTLP/gRPC endpoint that will accept telemetry data.
82
+ //
83
+ //nolint:lll
84
+ // +kubebuilder:validation:Pattern=`^(?:http?:\/\/)?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*(?::\d{1,5})?$`
80
85
Endpoint string `json:"endpoint"`
81
86
}
87
+
88
+ // AttributeValue is a value paired with a key and attached to a tracing span.
89
+ //
90
+ // +kubebuilder:validation:MaxLength=255
91
+ type AttributeValue string
0 commit comments