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' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
build-args: |
|
||||||
|
GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")
|
||||||
provenance: mode=max
|
provenance: mode=max
|
||||||
sbom: true
|
sbom: true
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,11 @@ RUN mkdir -p /temp
|
||||||
COPY . /temp
|
COPY . /temp
|
||||||
# Copy dependencies
|
# Copy dependencies
|
||||||
COPY --from=install /temp/node_modules /temp/node_modules
|
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
|
# Build the project
|
||||||
WORKDIR /temp
|
WORKDIR /temp
|
||||||
RUN bun run build
|
RUN bun run build
|
||||||
|
|
|
||||||
|
|
@ -3900,6 +3900,13 @@
|
||||||
"maximum": 1,
|
"maximum": 1,
|
||||||
"default": 1
|
"default": 1
|
||||||
},
|
},
|
||||||
|
"trace_propagation_targets": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"default": []
|
||||||
|
},
|
||||||
"max_breadcrumbs": {
|
"max_breadcrumbs": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"default": 100
|
"default": 100
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
"wc": "find server database *.ts docs packages types utils drizzle tests -type f -print0 | wc -m --files0-from=-",
|
"wc": "find server database *.ts docs packages types utils drizzle tests -type f -print0 | wc -m --files0-from=-",
|
||||||
"cli": "bun run cli/index.ts",
|
"cli": "bun run cli/index.ts",
|
||||||
"prune": "ts-prune | grep -v server/ | grep -v dist/ | grep -v '(used in module)'",
|
"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 .",
|
"check": "bunx tsc -p .",
|
||||||
"prepare": "bunx husky"
|
"prepare": "bunx husky"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -575,6 +575,7 @@ export const configValidator = z.object({
|
||||||
debug: z.boolean().default(false),
|
debug: z.boolean().default(false),
|
||||||
sample_rate: z.number().min(0).max(1.0).default(1.0),
|
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),
|
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),
|
max_breadcrumbs: z.number().default(100),
|
||||||
environment: z.string().optional(),
|
environment: z.string().optional(),
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,8 @@ const sentryInstance =
|
||||||
maxBreadcrumbs: config.logging.sentry.max_breadcrumbs,
|
maxBreadcrumbs: config.logging.sentry.max_breadcrumbs,
|
||||||
tracesSampleRate: config.logging.sentry.traces_sample_rate,
|
tracesSampleRate: config.logging.sentry.traces_sample_rate,
|
||||||
environment: config.logging.sentry.environment,
|
environment: config.logging.sentry.environment,
|
||||||
tracePropagationTargets: [config.http.bind],
|
tracePropagationTargets:
|
||||||
|
config.logging.sentry.trace_propagation_targets,
|
||||||
release: pkg.version,
|
release: pkg.version,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue