(interaction, overrides = {})
| 26 | } |
| 27 | |
| 28 | export function createInteractionTraceContext(interaction, overrides = {}) { |
| 29 | return { |
| 30 | traceId: createTraceId(), |
| 31 | interactionId: interaction?.id || null, |
| 32 | interactionType: interaction?.type || null, |
| 33 | guildId: interaction?.guildId || null, |
| 34 | channelId: interaction?.channelId || null, |
| 35 | userId: interaction?.user?.id || null, |
| 36 | command: sanitizeCommandName(interaction), |
| 37 | ...overrides |
| 38 | }; |
| 39 | } |
| 40 | |
| 41 | export function runWithTraceContext(traceContext, callback) { |
| 42 | return traceStorage.run(traceContext, callback); |
no test coverage detected