mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
feat(config): 🧑💻 Add custom tracing URL support to Sentry config
This commit is contained in:
parent
7d1522cc1e
commit
bc25896ed8
2
.github/workflows/docker-publish.yml
vendored
2
.github/workflows/docker-publish.yml
vendored
|
|
@ -62,6 +62,8 @@ jobs:
|
|||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")
|
||||
provenance: mode=max
|
||||
sbom: true
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@ RUN mkdir -p /temp
|
|||
COPY . /temp
|
||||
# Copy dependencies
|
||||
COPY --from=install /temp/node_modules /temp/node_modules
|
||||
|
||||
# Set current Git commit hash as an environment variable
|
||||
ARG GIT_COMMIT
|
||||
ENV GIT_COMMIT=$GIT_COMMIT
|
||||
|
||||
# Build the project
|
||||
WORKDIR /temp
|
||||
RUN bun run build
|
||||
|
|
|
|||
|
|
@ -3900,6 +3900,13 @@
|
|||
"maximum": 1,
|
||||
"default": 1
|
||||
},
|
||||
"trace_propagation_targets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"max_breadcrumbs": {
|
||||
"type": "number",
|
||||
"default": 100
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
"wc": "find server database *.ts docs packages types utils drizzle tests -type f -print0 | wc -m --files0-from=-",
|
||||
"cli": "bun run cli/index.ts",
|
||||
"prune": "ts-prune | grep -v server/ | grep -v dist/ | grep -v '(used in module)'",
|
||||
"schema:generate": "bun run packages/config-manager/json-schema.ts > config/config.schema.json",
|
||||
"check": "bunx tsc -p .",
|
||||
"prepare": "bunx husky"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -575,6 +575,7 @@ export const configValidator = z.object({
|
|||
debug: z.boolean().default(false),
|
||||
sample_rate: z.number().min(0).max(1.0).default(1.0),
|
||||
traces_sample_rate: z.number().min(0).max(1.0).default(1.0),
|
||||
trace_propagation_targets: z.array(z.string()).default([]),
|
||||
max_breadcrumbs: z.number().default(100),
|
||||
environment: z.string().optional(),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ const sentryInstance =
|
|||
maxBreadcrumbs: config.logging.sentry.max_breadcrumbs,
|
||||
tracesSampleRate: config.logging.sentry.traces_sample_rate,
|
||||
environment: config.logging.sentry.environment,
|
||||
tracePropagationTargets: [config.http.bind],
|
||||
tracePropagationTargets:
|
||||
config.logging.sentry.trace_propagation_targets,
|
||||
release: pkg.version,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue