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 19e2b6a
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 16 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ jobs:
- name: Check Out Repo
uses: actions/checkout@v4

- name: Add telemetry variables
env:
CONNECT_TELEMETRY_PRIV_KEY: ${{ secrets.TelemetryPrivateKey }}
CONNECT_TELEMETRY_DELAY: 1m

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down Expand Up @@ -54,6 +49,8 @@ jobs:
run: ./resources/scripts/release_notes.sh > ./release_notes.md

- name: Write telemetry private key
env:
CONNECT_TELEMETRY_PRIV_KEY: ${{ secrets.TELEMETRY_PRIVATE_KEY }}
run: echo "$CONNECT_TELEMETRY_PRIV_KEY" > ./internal/telemetry/key.pem

- uses: actions/setup-python@v5
Expand All @@ -71,6 +68,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLOUDSMITH_API_KEY: ${{ env.CLOUDSMITH_API_KEY }}
CONNECT_TELEMETRY_DELAY: 1m
CONNECT_TELEMETRY_PERIOD: 30s
CONNECT_TELEMETRY_HOST: http://localhost:8080

docker:
runs-on: ubuntu-latest
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/upload_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,15 @@ jobs:
with:
aws-region: ${{ vars.RP_AWS_CRED_REGION }}
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 }}
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
check-latest: true
- name: Write telemetry private key
env:
CONNECT_TELEMETRY_PRIV_KEY: ${{ secrets.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 19e2b6a

Please sign in to comment.