Skip to content

Commit a64772b

Browse files
authored
NETOBSERV-2355: Rename sampling ratio/rate -> interval (#1095)
1 parent ea276fb commit a64772b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

docs/api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Following is the supported API format for filter transformations:
191191
value: specified value of input field:
192192
castInt: set true to cast the value field as an int (numeric values are float64 otherwise)
193193
keepEntryQuery: configuration for keep_entry rule
194-
keepEntrySampling: sampling value for keep_entry type: 1 flow on <sampling> is kept
194+
keepEntrySampling: sampling interval for keep_entry type: 1 flow on <sampling> is kept
195195
addField: configuration for add_field rule
196196
input: entry input field
197197
value: specified value of input field:
@@ -220,7 +220,7 @@ Following is the supported API format for filter transformations:
220220
parameters: parameters specific to type
221221
assignee: value needs to assign to output field
222222
conditionalSampling: sampling configuration rules
223-
value: sampling value: 1 flow on <sampling> is kept
223+
value: sampling interval: 1 flow on <sampling> is kept
224224
rules: rules to be satisfied for this sampling configuration
225225
type: (enum) one of the following:
226226
remove_entry_if_exists: removes the entry if the field exists

docs/filtering.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The language is currently integrated in the "keep_entry" transform/filtering API
3434
rules:
3535
- type: keep_entry_query
3636
keepEntryQuery: (namespace="A" and with(workload)) or service=~"abc.+"
37-
keepEntrySampling: 10 # Optionally, a sampling ratio can be associated with the filter
37+
keepEntrySampling: 10 # Optionally, a sampling interval can be associated with the filter
3838
```
3939
4040
## Integration with the NetObserv operator
@@ -48,7 +48,7 @@ spec:
4848
- query: |
4949
(SrcK8S_Namespace="netobserv" OR (SrcK8S_Namespace="openshift-ingress" AND DstK8S_Namespace="netobserv"))
5050
outputTarget: Loki # The filter can target a specific output (such as Loki logs or exported data), or all outputs.
51-
sampling: 10 # Optionally, a sampling ratio can be associated with the filter
51+
sampling: 10 # Optionally, a sampling interval can be associated with the filter
5252
```
5353

5454
See also the [list of field names](https://github.com/netobserv/network-observability-operator/blob/main/docs/flows-format.adoc) that are available for queries, and the [API documentation](https://github.com/netobserv/network-observability-operator/blob/main/docs/FlowCollector.md#flowcollectorspecprocessorfiltersindex-1).

pkg/api/transform_filter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type TransformFilterRule struct {
6363
RemoveEntry *TransformFilterGenericRule `yaml:"removeEntry,omitempty" json:"removeEntry,omitempty" doc:"configuration for remove_entry_* rules"`
6464
RemoveEntryAllSatisfied []*RemoveEntryRule `yaml:"removeEntryAllSatisfied,omitempty" json:"removeEntryAllSatisfied,omitempty" doc:"configuration for remove_entry_all_satisfied rule"`
6565
KeepEntryQuery string `yaml:"keepEntryQuery,omitempty" json:"keepEntryQuery,omitempty" doc:"configuration for keep_entry rule"`
66-
KeepEntrySampling uint16 `yaml:"keepEntrySampling,omitempty" json:"keepEntrySampling,omitempty" doc:"sampling value for keep_entry type: 1 flow on <sampling> is kept"`
66+
KeepEntrySampling uint16 `yaml:"keepEntrySampling,omitempty" json:"keepEntrySampling,omitempty" doc:"sampling interval for keep_entry type: 1 flow on <sampling> is kept"`
6767
AddField *TransformFilterGenericRule `yaml:"addField,omitempty" json:"addField,omitempty" doc:"configuration for add_field rule"`
6868
AddFieldIfDoesntExist *TransformFilterGenericRule `yaml:"addFieldIfDoesntExist,omitempty" json:"addFieldIfDoesntExist,omitempty" doc:"configuration for add_field_if_doesnt_exist rule"`
6969
AddFieldIf *TransformFilterRuleWithAssignee `yaml:"addFieldIf,omitempty" json:"addFieldIf,omitempty" doc:"configuration for add_field_if rule"`
@@ -115,7 +115,7 @@ type RemoveEntryRule struct {
115115
}
116116

117117
type SamplingCondition struct {
118-
Value uint16 `yaml:"value,omitempty" json:"value,omitempty" doc:"sampling value: 1 flow on <sampling> is kept"`
118+
Value uint16 `yaml:"value,omitempty" json:"value,omitempty" doc:"sampling interval: 1 flow on <sampling> is kept"`
119119
Rules []*RemoveEntryRule `yaml:"rules,omitempty" json:"rules,omitempty" doc:"rules to be satisfied for this sampling configuration"`
120120
}
121121

0 commit comments

Comments
 (0)