Rule¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L465-L721
No fields
Rule.RuleFlushConfiguration¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L466-L476
| Field | Type | Description |
|---|---|---|
| id | string up to 100 chars; server generated |
The server-generated ID for this rule action. This can be used to query for sessions that arrive at this rule action. |
| applied_daily_limit | uint32 server generated |
The effective daily capture limit currently applied to this rule. |
| match_id | string up to 100 chars |
Points to a step's match ID that will trigger session capture when this flush rule is hit. |
Example¶
{
"applied_daily_limit": 25,
"id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"match_id": "_i1yUnHjKfmWpCaD5Tazo"
}
Rule.RuleMetricChartConfiguration¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L478-L615
| Field | Type | Description |
|---|---|---|
| time_series | up to 100 items |
Explicit lists of time series to generate for this rule. |
Example¶
{
"time_series": [
{
"aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"rate": {
"denominator": {
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
},
"denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
},
"numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
},
"track_unique": {
"device_id": true
}
}
]
}
Rule.RuleMetricChartConfiguration.DataReference¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L480-L495
A reference to data extracted from a previous rule in the workflow path.
| Field | Type | Description |
|---|---|---|
| match_id | string up to 100 chars |
Points to a step's match ID to extract the value from. If extraction type is measured_time, this must point to a Measure Time rule. |
| name | string up to 100 chars(Only one of name, or measured_time can be set) |
The name of the field to extract the value from. |
| measured_time | bool(Only one of measured_time, or name can be set) | Extract the measured time from a completed Measure Time rule. This can only be set if the match_id points to a Measure Time rule. |
Example¶
{
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
}
Rule.RuleMetricChartConfiguration.TimeSeries¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L497-L611
| Field | Type | Description |
|---|---|---|
| rate | (Only one of rate, or histogram, count, average_count can be set) | A rate metric time series. |
| histogram | (Only one of histogram, or rate, count, average_count can be set) | A histogram metric time series. |
| count | (Only one of count, or rate, histogram, average_count can be set) | A count metric time series. |
| average_count | (Only one of average_count, or rate, histogram, count can be set) | An average count metric time series. |
| aggregated_id | string up to 100 chars; server generated |
This is the normalized ID for the time series. It is the ID that ends up being used in chart data requests, attaching alerts, etc. |
| track_unique | Whether to track unique contributions to each aggregation interval for this time series. |
Example¶
{
"aggregated_id": "count/fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"rate": {
"denominator": {
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
},
"denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
},
"numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
},
"track_unique": {
"device_id": true
}
}
Rule.RuleMetricChartConfiguration.TimeSeries.Rate¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L501-L521
A rate metric that is going to be generated for this time series. This is done by emitting simple counters for each of the extracted values and computing the ratio server-side.
| Field | Type | Description |
|---|---|---|
| numerator | The data reference to use for the rate numerator. | |
| denominator | The data reference to use for the rate denominator. | |
| numerator_id | string up to 100 chars; server generated |
The server-generated ID for this rate metric. This can be used to query for the metric. |
| denominator_id | string up to 100 chars; server generated |
The server-generated ID for the denominator metric. This can be used to query for the metric. |
| group_by | An optional group by configuration for the time series. The chart will select a limited number of time series based on a top K lookup of the most relevant time series. If the group by is not set, the generated chart will show the time series as a single line. |
Example¶
{
"denominator": {
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
},
"denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
},
"numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
}
Rule.RuleMetricChartConfiguration.TimeSeries.Histogram¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L526-L540
A histogram metric that is going to be generated for this time series. This is done by emitting histogram values for each value of the extracted value, aggregated server-side.
| Field | Type | Description |
|---|---|---|
| value | The data reference whose values will be recorded in the histogram. | |
| group_by | An optional group by configuration for the time series. The chart will select a limited number of time series based on a top K lookup of the most relevant time series. If the group by is not set, the generated chart will show the time series with one line per (P50, P90, P99) percentile. | |
| id | string up to 100 chars; server generated |
The server-generated ID for this histogram metric. This can be used to query for the metric. |
Example¶
{
"group_by": {
"values": [
{
"log_body": false
}
]
},
"id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"value": {
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
}
}
Rule.RuleMetricChartConfiguration.TimeSeries.Count¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L544-L557
A count metric that is going to be generated for this time series. This is done by emitting a counter with the extracted value.
| Field | Type | Description |
|---|---|---|
| value | The data reference whose values will be emitted into the counter. | |
| group_by | An optional group by configuration for the time series. The chart will select a limited number of time series based on a top K lookup of the most relevant time series. If the group by is not set, the generated chart will show the time series as a single line. | |
| id | string up to 100 chars; server generated |
The server-generated ID for this count metric. This can be used to query for the metric. |
Example¶
{
"group_by": {
"values": [
{
"log_body": false
}
]
},
"id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"value": {
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
}
}
Rule.RuleMetricChartConfiguration.TimeSeries.AverageCount¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L563-L580
This time series type will produce an average counter, by emitting a synthetic denominator counter increment every time the numerator counter is extracted and incremented. In practice this is identical to rate, but the display will not be % based and the denominator is implicit.
| Field | Type | Description |
|---|---|---|
| numerator | The data reference to use for the average count numerator. | |
| numerator_id | string up to 100 chars; server generated |
The server-generated ID for this rate metric. This can be used to query for the metric. |
| denominator_id | string up to 100 chars; server generated |
The server-generated ID for the denominator metric. This can be used to query for the metric. |
| group_by | An optional group by configuration for the time series. The chart will select a limited number of time series based on a top K lookup of the most relevant time series. If the group by is not set, the generated chart will show the time series as a single line. |
Example¶
{
"denominator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"group_by": {
"values": [
{
"log_body": false
}
]
},
"numerator": {
"match_id": "_i1yUnHjKfmWpCaD5Tazo",
"name": "field_name"
},
"numerator_id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
}
Rule.RuleMetricChartConfiguration.TimeSeries.TrackUnique¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L582-L588
| Field | Type | Description |
|---|---|---|
| device_id | bool | This is computed entirely server-side and thus does not require any client emission. |
Example¶
{
"device_id": true
}
Rule.RuleSankeyDiagramConfiguration¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L617-L651
| Field | Type | Description |
|---|---|---|
| nodes | up to 100 items |
The list of nodes. Since workflows can have loops and each node corresponds to a matcher within a workflow, it's possible for a given matcher and its corresponding node to be visited multiple times. For each visit, a new value is extracted. Additional details related to each node of the diagram. This data is not modified by the server during workflow updates, allowing the frontend to store information that remains stable between updates. All target nodes must be within the same flow. |
| id | string up to 100 chars; server generated |
The server-generated ID for this rule action. This uniquely identifies the Sankey diagram in a way which is consistent between workflows that define the same Sankey diagram. |
Example¶
{
"id": "fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc",
"nodes": [
{
"extract_field": "field_name",
"id": "_i1yUnHjKfmWpCaD5Tazo"
}
]
}
Rule.RuleSankeyDiagramConfiguration.Node¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L620-L635
Configuration for creating Sankey diagram nodes in response to workflow state updates. Each node corresponds to a matching rule.
| Field | Type | Description |
|---|---|---|
| id | string between 1 and 100 chars |
ID of the corresponding matching rule. |
| fixed | string up to 255 chars(Only one of fixed, or extract_field can be set) |
The fixed value. |
| extract_field | string up to 100 chars(Only one of extract_field, or fixed can be set) |
The name of the field whose value should be extracted. |
Example¶
{
"extract_field": "field_name",
"id": "_i1yUnHjKfmWpCaD5Tazo"
}
Rule.RuleFunnelConfiguration¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L653-L661
| Field | Type | Description |
|---|---|---|
| ids | array of string up to 100 items; server generated |
The server-generated IDs for this funnel. This is generated by the server and may change during updates. |
| match_ids | array of string up to 100 items |
The match IDs in the workflow that correspond to the steps of the funnel. All match IDs must be from the same flow. |
Example¶
{
"ids": [
"fkQ1PfAZhdYvJexzY6DYuoYCZTEaWO0Y7spxwjr7akc"
],
"match_ids": [
"_i1yUnHjKfmWpCaD5Tazo"
]
}
Rule.RuleMeasureTime¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L663-L703
| Field | Type | Description |
|---|---|---|
| name | string up to 255 chars |
A unique identifier for this node that will be included in the generated message body. |
| start_match_id | string up to 100 chars |
The start match ID of the step to start measuring from. Must be in the same flow as the end match ID. |
| end_match_id | string up to 100 chars |
The end match ID of the step to end measuring at. Must be in the same flow as the start match ID. |
| correlation_field_name | optional string up to 100 chars |
Allows the ability to measure time between two rules with a common correlation id. This is useful when the start and end can be racey and we end up measuring time between unrelated events. An example of this is when you measure download time and you get events like: - Download started, id=A - Download started, id=B - Download completed, id=A - Download completed, id=B Without this we'd be measuring the time between B started and A completed. |
| additional_extracted_fields | array of string up to 100 items |
Supplies optional fields that will be extracted from the log when the time measurement is completed. |
| measure_time_condition | An optional condition to check when time measurement is complete. If specified, actions that target the match_id of this rule will only be triggered if the condition is met. |
Example¶
{
"additional_extracted_fields": [
"field_name"
],
"correlation_field_name": "field_name",
"end_match_id": "_i1yUnHjKfmWpCaD5Tazo",
"measure_time_condition": {
"duration_threshold": "3600s",
"operator": "NOT_EQUAL"
},
"name": "name",
"start_match_id": "_i1yUnHjKfmWpCaD5Tazo"
}
Rule.RuleMeasureTime.MeasureTimeCondition¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L664-L670
| Field | Type | Description |
|---|---|---|
| operator | bitdrift.public.unary.workflows.v1.Operator must be a defined enum value |
The operator to use when evaluating the duration threshold. |
| duration_threshold | google.protobuf.Duration | The duration threshold to use when evaluating the condition. |
Example¶
{
"duration_threshold": "3600s",
"operator": "NOT_EQUAL"
}
Rule.RuleTimeout¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L707-L720
This is valid anywhere a generic match or OOTB match rule is allowed, including attached to start with the caveat that we only allow a single timeout outbound from any origin.
| Field | Type | Description |
|---|---|---|
| duration | uint32 greater than 0 |
The timeout duration for this rule. |
| duration_unit | bitdrift.public.unary.workflows.v1.Rule.RuleTimeout.DurationUnit must be a defined enum value |
The unit for the timeout duration value. |
Example¶
{
"duration": 1,
"duration_unit": "SECONDS"
}
Rule.RuleTimeout.DurationUnit Enum¶
Source definition: src/bitdrift/public/unary/workflows/v1/workflow.proto#L708-L713
| Name | Number | Description |
|---|---|---|
| MILLISECONDS | 0 | |
| SECONDS | 1 | |
| MINUTES | 2 | |
| HOURS | 3 |