Skip to content

Commit

Permalink
Merge pull request #215 from gessnerfl/feature/214_erorrs_app_alert
Browse files Browse the repository at this point in the history
closes #214: feature implemented, quality metrics and tests OK
  • Loading branch information
gessnerfl authored Jan 3, 2024
2 parents 5548cf4 + c878358 commit cdd284d
Show file tree
Hide file tree
Showing 13 changed files with 5,593 additions and 3,638 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.20.0'

Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
set +euo pipefail
- name: Upload test log
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: unit-test-report
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-extended,security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/dependency-submisssion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: 'Checkout Repository'
uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ">=1.20.0"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
run: git fetch --prune --unshallow

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: 1.20.0

Expand Down
13 changes: 7 additions & 6 deletions docs/resources/application_alert_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ identifier := [a-zA-Z_][\.a-zA-Z0-9_\-/]*
Exactly one of the elements below must be configured

* `error_rate` - Optional - Rule based on the error rate of the configured alert configuration target. [Details](#error-rate-rule-argument-reference)
* `errors` - Optional - Rule based on the number of errors of the configured alert configuration target. [Details](#errors-rule-argument-reference)
* `logs` - Optional - Rule based on logs of the configured alert configuration target. [Details](#logs-rule-argument-reference)
* `slowness` - Optional - Rule based on the slowness of the configured alert configuration target. [Details](#slowness-rule-argument-reference)
* `status_code` - Optional - Rule based on the HTTP status code of the configured alert configuration target. [Details](#status-code-rule-argument-reference)
Expand All @@ -140,14 +141,17 @@ Exactly one of the elements below must be configured
#### Error Rate Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hash` - Optional - The stable hash used for the application alert rule
* `aggregation` - Optional - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`

#### Errors Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Optional - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`

#### Logs Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hash` - Optional - The stable hash used for the application alert rule
* `level` - Required - The log level for which this rule applies to. Supported values: `WARN`, `ERROR`, `ANY`
* `message` - Optional - The log message for which this rule applies to.
* `operator` - Required - The operator which will be applied to evaluate this rule. Supported values: `EQUALS`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAIN`, `IS_EMPTY`, `NOT_EMPTY`, `IS_BLANK`, `IS_BLANK`, `NOT_BLANK`, `STARTS_WITH`, `ENDS_WITH`, `NOT_STARTS_WITH`, `NOT_ENDS_WITH`, `GREATER_OR_EQUAL_THAN`, `LESS_OR_EQUAL_THAN`, `GREATER_THAN`, `LESS_THAN`
Expand All @@ -156,21 +160,18 @@ Exactly one of the elements below must be configured

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hash` - Optional - The stable hash used for the application alert rule

#### Status Code Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hash` - Optional - The stable hash used for the application alert rule
* `status_code_start` - Optional - minimal HTTP status code applied for this rule
* `status_code_end` - Optional - maximum HTTP status code applied for this rule

#### Throughput Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hash` - Optional - The stable hash used for the application alert rule

### Custom Payload Field Argument Reference

Expand Down
13 changes: 7 additions & 6 deletions docs/resources/global_application_alert_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ identifier := [a-zA-Z_][\.a-zA-Z0-9_\-/]*
Exactly one of the elements below must be configured

* `error_rate` - Optional - Rule based on the error rate of the configured alert configuration target. [Details](#error-rate-rule-argument-reference)
* `errors` - Optional - Rule based on the number of errors of the configured alert configuration target. [Details](#errors-rule-argument-reference)
* `logs` - Optional - Rule based on logs of the configured alert configuration target. [Details](#logs-rule-argument-reference)
* `slowness` - Optional - Rule based on the slowness of the configured alert configuration target. [Details](#slowness-rule-argument-reference)
* `status_code` - Optional - Rule based on the HTTP status code of the configured alert configuration target. [Details](#status-code-rule-argument-reference)
Expand All @@ -139,14 +140,17 @@ Exactly one of the elements below must be configured
#### Error Rate Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hast` - Optional - The stable hash used for the application alert rule
* `aggregation` - Optional - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`

#### Errors Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Optional - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`

#### Logs Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hast` - Optional - The stable hash used for the application alert rule
* `level` - Required - The log level for which this rule applies to. Supported values: `WARN`, `ERROR`, `ANY`
* `message` - Optional - The log message for which this rule applies to.
* `operator` - Required - The operator which will be applied to evaluate this rule. Supported values: `EQUALS`, `NOT_EQUAL`, `CONTAINS`, `NOT_CONTAIN`, `IS_EMPTY`, `NOT_EMPTY`, `IS_BLANK`, `IS_BLANK`, `NOT_BLANK`, `STARTS_WITH`, `ENDS_WITH`, `NOT_STARTS_WITH`, `NOT_ENDS_WITH`, `GREATER_OR_EQUAL_THAN`, `LESS_OR_EQUAL_THAN`, `GREATER_THAN`, `LESS_THAN`
Expand All @@ -155,21 +159,18 @@ Exactly one of the elements below must be configured

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hast` - Optional - The stable hash used for the application alert rule

#### Status Code Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hast` - Optional - The stable hash used for the application alert rule
* `status_code_start` - Optional - minimal HTTP status code applied for this rule
* `status_code_end` - Optional - maximum HTTP status code applied for this rule

#### Throughput Rule Argument Reference

* `metric_name` - Required - The metric name of the application alert rule
* `aggregation` - Required - The aggregation function of the application alert rule. Supported values `SUM`, `MEAN`, `MAX`, `MIN`, `P25`, `P50`, `P75`, `P90`, `P95`, `P98`, `P99`, `P99_9`, `P99_99`, `DISTRIBUTION`, `DISTINCT_COUNT`, `SUM_POSITIVE`
* `stable_hast` - Optional - The stable hash used for the application alert rule

### Custom Payload Field Argument Reference

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ require (
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 // indirect
google.golang.org/grpc v1.60.1 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM=
google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 h1:/jFB8jK5R3Sq3i/lmeZO0cATSzFfZaJq1J2Euan3XKU=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0/go.mod h1:FUoWkonphQm3RhTS+kOEhF8h0iDpm4tdXolVCeZ9KKA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917 h1:6G8oQ016D88m1xAKljMlBOOGWDZkes4kMhgGFlf8WcQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240102182953-50ed04b92917/go.mod h1:xtjpI3tXFPP051KaWnhvxkiubL/6dJ18vLVf7q2pTOU=
google.golang.org/grpc v1.60.1 h1:26+wFr+cNqSGFcOXcabYC0lUVJVRa2Sb2ortSK7VrEU=
google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
Expand Down
Loading

0 comments on commit cdd284d

Please sign in to comment.