Skip to content

Commit

Permalink
setup: sentry sample rate (#989)
Browse files Browse the repository at this point in the history
Signed-off-by: Kathurima Kimathi <[email protected]>
  • Loading branch information
KathurimaKimathi authored Dec 15, 2023
1 parent 0e31549 commit 4a7c5c7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ env:
HEALTH_CRM_BASE_URL: ${{ secrets.HEALTH_CRM_BASE_URL }}
JAEGER_COLLECTOR_ENDPOINT: ${{ secrets.JAEGER_COLLECTOR_ENDPOINT }}
DEFAULT_FACILITY_MFL_CODE: ${{ secrets.DEFAULT_FACILITY_MFL_CODE }}
SENTRY_TRACE_SAMPLE_RATE: ${{ secrets.SENTRY_TRACE_SAMPLE_RATE }}

concurrency:
group: lint-and-test
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/multitenant-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ env:
PGBOUNCER_POOL_MODE: ${{ secrets.PGBOUNCER_POOL_MODE }}
JAEGER_COLLECTOR_ENDPOINT: ${{ secrets.JAEGER_COLLECTOR_ENDPOINT }}
DEFAULT_FACILITY_MFL_CODE: ${{ secrets.DEFAULT_FACILITY_MFL_CODE }}
SENTRY_TRACE_SAMPLE_RATE: ${{ secrets.SENTRY_TRACE_SAMPLE_RATE }}

jobs:
deploy_to_multitenant_staging:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ spec:
- name: DEFAULT_FACILITY_MFL_CODE
value: {{ .Values.app.container.env.defaultFacilityCode | quote }}

- name: SENTRY_TRACE_SAMPLE_RATE
value: {{ .Values.app.container.env.defaultSentryTraceSampleRate | quote }}

volumeMounts:
- name: {{ .Values.app.container.env.googleApplicationCredentialsSecret.name }}
mountPath: {{ .Values.app.container.env.googleApplicationCredentialsSecret.mountPath }}
Expand Down
1 change: 1 addition & 0 deletions deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ helm upgrade \
--set networking.issuer.privateKeySecretRef="letsencrypt-prod"\
--set networking.ingress.host="${APPDOMAIN}"\
--set app.container.env.defaultFacilityCode="${DEFAULT_FACILITY_MFL_CODE}"\
--set app.container.env.defaultSentryTraceSampleRate="${SENTRY_TRACE_SAMPLE_RATE}"\
--wait \
--timeout 300s \
-f ./charts/mycarehub-multitenant/values.yaml \
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0
go.opentelemetry.io/otel/sdk v1.21.0
golang.org/x/crypto v0.14.0
golang.org/x/text v0.13.0
golang.org/x/text v0.14.0
google.golang.org/api v0.149.0
gopkg.in/go-playground/validator.v9 v9.31.0
gorm.io/driver/postgres v1.5.2
Expand Down Expand Up @@ -189,7 +189,7 @@ require (
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1494,8 +1494,8 @@ golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand All @@ -1515,8 +1515,8 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
4 changes: 3 additions & 1 deletion pkg/mycarehub/usecases/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,9 @@ func (us *UseCasesUserImpl) Register(ctx context.Context, payload *dto.SignUpPay
return nil, fmt.Errorf("unable to check if username exists: %w", err)
}
if usernameExists {
return nil, fmt.Errorf("username %s already exists", payload.ClientInput.Username)
err := fmt.Errorf("username %s already exists", payload.ClientInput.Username)
helpers.ReportErrorToSentry(err)
return nil, err
}

normalized, err := converterandformatter.NormalizeMSISDN(payload.ClientInput.PhoneNumber)
Expand Down

0 comments on commit 4a7c5c7

Please sign in to comment.