sentry: add a prefix to the release name
This commit is contained in:
parent
67e0d349df
commit
d8668c926d
|
@ -40,7 +40,7 @@ jobs:
|
|||
with:
|
||||
context: .
|
||||
build-args: |
|
||||
VERSION=v${{ steps.get_version.outputs.VERSION }}
|
||||
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||
tags: |
|
||||
${{ secrets.REGISTRY_NAME }}/zdam-egzamin-zawodowy-backend:latest
|
||||
${{ secrets.REGISTRY_NAME }}/zdam-egzamin-zawodowy-backend:${{ steps.get_version.outputs.VERSION }}
|
||||
|
|
|
@ -11,7 +11,7 @@ RUN go mod download
|
|||
|
||||
# Copy the source from the current directory to the Working Directory inside the container
|
||||
COPY ../.. .
|
||||
ARG VERSION="v0.0.0"
|
||||
ARG VERSION="0.0.0"
|
||||
RUN apk --no-cache add musl-dev gcc build-base
|
||||
RUN go generate ./...
|
||||
RUN go build -ldflags="-X 'main.Version=$VERSION'" -o zdamegzawodowy ./cmd/server
|
||||
|
|
|
@ -7,11 +7,15 @@ import (
|
|||
"os"
|
||||
)
|
||||
|
||||
func InitSentry(release string) error {
|
||||
const (
|
||||
sentryAppName = "zdam-egzamin-zawodowy-backend"
|
||||
)
|
||||
|
||||
func InitSentry(version string) error {
|
||||
err := sentry.Init(sentry.ClientOptions{
|
||||
Dsn: os.Getenv("SENTRY_DSN"),
|
||||
Environment: appmode.Get(),
|
||||
Release: release,
|
||||
Release: sentryAppName + "@" + version,
|
||||
Debug: false,
|
||||
TracesSampleRate: 0.3,
|
||||
})
|
||||
|
|
Reference in New Issue