Skip to content

Commit

Permalink
Add ability to test from gaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffail committed Oct 15, 2024
1 parent e3cded8 commit e1ce5f0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:

- name: Add telemetry variables
env:
CONNECT_TELEMETRY_PRIV_KEY: ${{ secrets.TelemetryPrivateKey }}
CONNECT_TELEMETRY_PRIV_KEY: ${{ secrets.TELEMETRY_PRIVATE_KEY }}
CONNECT_TELEMETRY_DELAY: 1m
CONNECT_TELEMETRY_PERIOD: 30s
CONNECT_TELEMETRY_HOST: http://localhost:8080

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/upload_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ jobs:
role-to-assume: arn:aws:iam::${{ secrets.RP_AWS_CRED_ACCOUNT_ID }}:role/${{ vars.RP_AWS_CRED_BASE_ROLE_NAME }}${{ github.event.repository.name }}
- name: Add telemetry variables
env:
CONNECT_TELEMETRY_PRIV_KEY: ${{ secrets.TelemetryPrivateKey }}
CONNECT_TELEMETRY_PRIV_KEY: ${{ secrets.TELEMETRY_PRIVATE_KEY }}
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
check-latest: true
- name: Write telemetry private key
run: echo "$CONNECT_TELEMETRY_PRIV_KEY" > ./internal/telemetry/key.pem
- name: Build binaries (dry run / snapshot mode)
if: ${{ env.DRY_RUN != 'false' }}
uses: goreleaser/goreleaser-action@v6
Expand Down
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ builds:
-X main.Version={{.Version}}
-X main.DateBuilt={{.Date}}
-X main.BinaryName=redpanda-connect
-X github.com/redpanda-data/connect/v4/internal/telemetry.ExportHost={{ if index .Env "CONNECT_TELEMETRY_HOST" }}{{ .Env.CONNECT_TELEMETRY_HOST }}{{ else }}{{ end }}
-X github.com/redpanda-data/connect/v4/internal/telemetry.ExportDelay={{ if index .Env "CONNECT_TELEMETRY_DELAY" }}{{ .Env.CONNECT_TELEMETRY_DELAY }}{{ else }}{{ end }}
-X github.com/redpanda-data/connect/v4/internal/telemetry.ExportPeriod={{ if index .Env "CONNECT_TELEMETRY_PERIOD" }}{{ .Env.CONNECT_TELEMETRY_PERIOD }}{{ else }}{{ end }}
- id: connect-cloud
main: cmd/redpanda-connect-cloud/main.go
Expand Down
16 changes: 8 additions & 8 deletions internal/impl/prometheus/metrics_prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@ If the Push Gateway requires HTTP Basic Authentication it can be configured with
Default(0.0),
).
Description("A list of timing metrics summary buckets (as quantiles). Applicable when `use_histogram_timing` is set to `false`.").
Example([]map[string]float64{
{"quantile": 0.5, "error": 0.05},
{"quantile": 0.9, "error": 0.01},
{"quantile": 0.99, "error": 0.001},
Example([]any{
map[string]any{"quantile": 0.5, "error": 0.05},
map[string]any{"quantile": 0.9, "error": 0.01},
map[string]any{"quantile": 0.99, "error": 0.001},
}).
Advanced().
Version("4.23.0").
Default([]map[string]float64{
{"quantile": 0.5, "error": 0.05},
{"quantile": 0.9, "error": 0.01},
{"quantile": 0.99, "error": 0.001},
Default([]any{
map[string]any{"quantile": 0.5, "error": 0.05},
map[string]any{"quantile": 0.9, "error": 0.01},
map[string]any{"quantile": 0.99, "error": 0.001},
}),
service.NewBoolField(pmFieldAddProcessMetrics).
Description("Whether to export process metrics such as CPU and memory usage in addition to Redpanda Connect metrics.").
Expand Down

0 comments on commit e1ce5f0

Please sign in to comment.