MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / createInteractionTraceContext

Function createInteractionTraceContext

src/utils/logger.js:28–39  ·  view source on GitHub ↗
(interaction, overrides = {})

Source from the content-addressed store, hash-verified

26}
27
28export 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
41export function runWithTraceContext(traceContext, callback) {
42 return traceStorage.run(traceContext, callback);

Callers 1

executeFunction · 0.90

Calls 2

createTraceIdFunction · 0.85
sanitizeCommandNameFunction · 0.85

Tested by

no test coverage detected