Merge pull request #12634 from Budibase/baggage-item

Baggage items don't work how I expected. Use tags again.
This commit is contained in:
Sam Rose 2023-12-19 17:47:37 +00:00 committed by GitHub
commit e01325b201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ export default async (ctx: UserCtx, next: any) => {
if (requestAppId) {
const span = tracer.scope().active()
span?.setBaggageItem("appId", requestAppId)
span?.setTag("appId", requestAppId)
}
// deny access to application preview
@ -79,9 +79,9 @@ export default async (ctx: UserCtx, next: any) => {
if (ctx.user) {
const span = tracer.scope().active()
if (ctx.user._id) {
span?.setBaggageItem("userId", ctx.user._id)
span?.setTag("userId", ctx.user._id)
}
span?.setBaggageItem("tenantId", ctx.user.tenantId)
span?.setTag("tenantId", ctx.user.tenantId)
}
const userId = ctx.user ? generateUserMetadataID(ctx.user._id!) : undefined