@logtape/sentry 2.3.0-dev.826 → 2.3.0-dev.840
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mod.cjs +4 -4
- package/dist/mod.d.cts +12 -0
- package/dist/mod.d.cts.map +1 -1
- package/dist/mod.d.ts +12 -0
- package/dist/mod.d.ts.map +1 -1
- package/dist/mod.js +4 -4
- package/dist/mod.js.map +1 -1
- package/package.json +2 -2
package/dist/mod.cjs
CHANGED
|
@@ -48,9 +48,9 @@ function mapLevelForLogs(level) {
|
|
|
48
48
|
default: return "info";
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (properties
|
|
51
|
+
const defaultErrorPropertyNames = ["error", "err"];
|
|
52
|
+
function getErrorProperty(properties, propertyNames) {
|
|
53
|
+
for (const property of propertyNames) if (properties[property] instanceof Error) return [property, properties[property]];
|
|
54
54
|
return void 0;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
@@ -196,7 +196,7 @@ function getSentrySink(optionsOrClient) {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
const isErrorLevel = (0, __logtape_logtape.compareLogLevel)(transformed.level, "error") >= 0;
|
|
199
|
-
const errorProperty = getErrorProperty(transformed.properties);
|
|
199
|
+
const errorProperty = getErrorProperty(transformed.properties, options.errorPropertyNames ?? defaultErrorPropertyNames);
|
|
200
200
|
if (isErrorLevel && errorProperty != null) {
|
|
201
201
|
const [property, error] = errorProperty;
|
|
202
202
|
const rest = { ...attributes };
|
package/dist/mod.d.cts
CHANGED
|
@@ -111,6 +111,18 @@ interface SentrySinkOptions {
|
|
|
111
111
|
* @since 1.3.0
|
|
112
112
|
*/
|
|
113
113
|
enableBreadcrumbs?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Property names to inspect for an `Error` instance when deciding whether
|
|
116
|
+
* error-level records should be sent through Sentry's `captureException()`.
|
|
117
|
+
*
|
|
118
|
+
* Names are checked in order, and the first property containing an `Error`
|
|
119
|
+
* instance is used as the captured exception. Set this to a custom list when
|
|
120
|
+
* your application or logger stores the primary exception under another name.
|
|
121
|
+
*
|
|
122
|
+
* @default `["error", "err"]`
|
|
123
|
+
* @since 2.3.0
|
|
124
|
+
*/
|
|
125
|
+
errorPropertyNames?: readonly string[];
|
|
114
126
|
/**
|
|
115
127
|
* Optional hook to transform or filter records before sending to Sentry.
|
|
116
128
|
* Return `null` to drop the record.
|
package/dist/mod.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.cts","names":[],"sources":["../src/mod.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"mod.d.cts","names":[],"sources":["../src/mod.ts"],"sourcesContent":[],"mappings":";;;;;;;AAuGA;AAiBA;;;;;;;;;;AA2DW,UA5EM,cAAA,CA4EN;EAAO,cAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,cAAA,CAAA,EAzEG,aAyEH,GAAA,OAAA,EAAA,GAAA,MAAA;EAeD,gBAAA,EAAA,CAAA,SAAiB,EAAA,OAAA,EAAA,IAAA,CAAA,EAAA,OAAA,EAAA,GAAA,MAAA;;;;;AAoDa;AA4F/C;;;;;AAEO,UA5NU,eAAA,CA4NV;;;;0BAvNM,sCACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA0CN;;;YAGD;;;;;;WAQH,QACP,OACE,4BAEW,iCACG;;;;;;UAUH,iBAAA;;;;;;;;;;;;;;;;;;;WAmBN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAiCa,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4FtB,aAAA,mBACI,oBAAoB,iBACrC"}
|
package/dist/mod.d.ts
CHANGED
|
@@ -111,6 +111,18 @@ interface SentrySinkOptions {
|
|
|
111
111
|
* @since 1.3.0
|
|
112
112
|
*/
|
|
113
113
|
enableBreadcrumbs?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Property names to inspect for an `Error` instance when deciding whether
|
|
116
|
+
* error-level records should be sent through Sentry's `captureException()`.
|
|
117
|
+
*
|
|
118
|
+
* Names are checked in order, and the first property containing an `Error`
|
|
119
|
+
* instance is used as the captured exception. Set this to a custom list when
|
|
120
|
+
* your application or logger stores the primary exception under another name.
|
|
121
|
+
*
|
|
122
|
+
* @default `["error", "err"]`
|
|
123
|
+
* @since 2.3.0
|
|
124
|
+
*/
|
|
125
|
+
errorPropertyNames?: readonly string[];
|
|
114
126
|
/**
|
|
115
127
|
* Optional hook to transform or filter records before sending to Sentry.
|
|
116
128
|
* Return `null` to drop the record.
|
package/dist/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","names":[],"sources":["../src/mod.ts"],"sourcesContent":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"mod.d.ts","names":[],"sources":["../src/mod.ts"],"sourcesContent":[],"mappings":";;;;;;;AAuGA;AAiBA;;;;;;;;;;AA2DW,UA5EM,cAAA,CA4EN;EAAO,cAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,cAAA,CAAA,EAzEG,aAyEH,GAAA,OAAA,EAAA,GAAA,MAAA;EAeD,gBAAA,EAAA,CAAA,SAAiB,EAAA,OAAA,EAAA,IAAA,CAAA,EAAA,OAAA,EAAA,GAAA,MAAA;;;;;AAoDa;AA4F/C;;;;;AAEO,UA5NU,eAAA,CA4NV;;;;0BAvNM,sCACQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA0CN;;;YAGD;;;;;;WAQH,QACP,OACE,4BAEW,iCACG;;;;;;UAUH,iBAAA;;;;;;;;;;;;;;;;;;;WAmBN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAiCa,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4FtB,aAAA,mBACI,oBAAoB,iBACrC"}
|
package/dist/mod.js
CHANGED
|
@@ -47,9 +47,9 @@ function mapLevelForLogs(level) {
|
|
|
47
47
|
default: return "info";
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (properties
|
|
50
|
+
const defaultErrorPropertyNames = ["error", "err"];
|
|
51
|
+
function getErrorProperty(properties, propertyNames) {
|
|
52
|
+
for (const property of propertyNames) if (properties[property] instanceof Error) return [property, properties[property]];
|
|
53
53
|
return void 0;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
@@ -195,7 +195,7 @@ function getSentrySink(optionsOrClient) {
|
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
197
|
const isErrorLevel = compareLogLevel(transformed.level, "error") >= 0;
|
|
198
|
-
const errorProperty = getErrorProperty(transformed.properties);
|
|
198
|
+
const errorProperty = getErrorProperty(transformed.properties, options.errorPropertyNames ?? defaultErrorPropertyNames);
|
|
199
199
|
if (isErrorLevel && errorProperty != null) {
|
|
200
200
|
const [property, error] = errorProperty;
|
|
201
201
|
const rest = { ...attributes };
|
package/dist/mod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.js","names":["record: LogRecord","tplValues: string[]","level: LogLevel","properties: Readonly<Record<string, unknown>>","optionsOrClient?: SentrySinkOptions | SentryInstance","legacyClient: SentryInstance | undefined","options: SentrySinkOptions","msg: ParameterizedString","ctx?: unknown","exception: unknown","hint?: unknown"],"sources":["../src/mod.ts"],"sourcesContent":["import {\n compareLogLevel,\n getLogger,\n type LogLevel,\n type LogRecord,\n type Sink,\n} from \"@logtape/logtape\";\nimport type {\n LogSeverityLevel,\n ParameterizedString,\n SeverityLevel,\n} from \"@sentry/core\";\n// Import namespace to safely check for public logger API (added in v9.41.0)\nimport * as SentryCore from \"@sentry/core\";\n// Cross-runtime inspect: Deno.inspect / util.inspect (handles circular\n// references); falls back to JSON.stringify in browsers. Resolved via the\n// `#util` import map per runtime.\nimport { inspect } from \"#util\";\n\n/**\n * Converts a LogTape {@link LogRecord} into a Sentry {@link ParameterizedString}.\n *\n * This preserves the template structure for better message grouping in Sentry,\n * allowing similar messages with different values to be grouped together.\n *\n * @param record The log record to convert.\n * @returns A parameterized string with template and values.\n */\nfunction getParameterizedString(record: LogRecord): ParameterizedString {\n let result = \"\";\n let tplString = \"\";\n const tplValues: string[] = [];\n for (let i = 0; i < record.message.length; i++) {\n if (i % 2 === 0) {\n result += record.message[i];\n tplString += String(record.message[i]).replaceAll(\"%\", \"%%\");\n } else {\n const value = inspect(record.message[i]);\n result += value;\n tplString += `%s`;\n tplValues.push(value);\n }\n }\n const paramStr = new String(result) as ParameterizedString;\n paramStr.__sentry_template_string__ = tplString;\n paramStr.__sentry_template_values__ = tplValues;\n return paramStr;\n}\n\n// Level normalization helpers\n\nfunction mapLevelForEvents(level: LogLevel): SeverityLevel {\n switch (level) {\n case \"trace\":\n return \"debug\";\n default:\n return level as SeverityLevel; // debug | info | error | fatal\n }\n}\n\nfunction mapLevelForLogs(level: LogLevel): LogSeverityLevel {\n switch (level) {\n case \"trace\":\n return \"debug\";\n case \"warning\":\n return \"warn\";\n case \"debug\":\n case \"info\":\n case \"error\":\n case \"fatal\":\n return level;\n default:\n return \"info\"; // fallback\n }\n}\n\nfunction getErrorProperty(\n properties: Readonly<Record<string, unknown>>,\n): readonly [property: \"error\" | \"err\", error: Error] | undefined {\n if (properties.error instanceof Error) {\n return [\"error\", properties.error];\n }\n if (properties.err instanceof Error) {\n return [\"err\", properties.err];\n }\n return undefined;\n}\n\n/**\n * A Sentry client instance type (used for v1.1.x backward compatibility).\n *\n * Client instances only support `captureMessage` and `captureException`.\n * For scope operations (breadcrumbs, user context, traces), the sink always\n * uses global functions from `@sentry/core`.\n *\n * @deprecated This is only used for backward compatibility with v1.1.x.\n * New code should use `getSentrySink()` without parameters, which automatically\n * uses Sentry's global functions.\n *\n * @since 1.3.0\n */\nexport interface SentryInstance {\n captureMessage: (\n message: string,\n captureContext?: SeverityLevel | unknown,\n ) => string;\n captureException: (exception: unknown, hint?: unknown) => string;\n}\n\n/**\n * A Sentry SDK namespace object.\n *\n * Pass the namespace imported by your application when *@logtape/sentry* should\n * use the same Sentry module instance that initialized your app, for example\n * `import * as Sentry from \"@sentry/node\"`.\n *\n * @since 2.2.0\n */\nexport interface SentryNamespace {\n /**\n * Captures a message event and sends it to Sentry.\n */\n captureMessage(\n message: ParameterizedString,\n captureContext?: SeverityLevel | unknown,\n ): string;\n\n /**\n * Captures an exception event and sends it to Sentry.\n */\n captureException(exception: unknown, hint?: unknown): string;\n\n /**\n * Gets the currently active span, if any.\n */\n getActiveSpan():\n | {\n spanContext: () => {\n traceId: string;\n spanId: string;\n parentSpanId?: string;\n };\n }\n | undefined;\n\n /**\n * Gets the currently active Sentry client, if any.\n */\n getClient():\n | {\n getOptions: () => {\n enableLogs?: boolean;\n _experiments?: {\n enableLogs?: boolean;\n };\n };\n }\n | undefined;\n\n /**\n * Gets the current isolation scope.\n */\n getIsolationScope():\n | {\n addBreadcrumb: (breadcrumb: {\n category: string;\n level: SeverityLevel;\n message: string;\n timestamp: number;\n data: Record<string, unknown>;\n }) => void;\n }\n | undefined;\n\n /**\n * Sentry's structured logging API, available in Sentry SDK 9.41.0+.\n */\n logger?: Partial<\n Record<\n LogSeverityLevel,\n (\n message: ParameterizedString,\n attributes: Record<string, unknown>,\n ) => void\n >\n >;\n}\n\n/**\n * Options for configuring the Sentry sink.\n * @since 1.3.0\n */\nexport interface SentrySinkOptions {\n /**\n * Sentry SDK namespace to use for capture, scope, span, and structured log\n * APIs.\n *\n * This is useful when your application initializes Sentry through a framework\n * SDK such as `@sentry/nextjs` or `@sentry/react-native`, and\n * *@logtape/sentry* resolves a different `@sentry/core` module instance.\n *\n * @example\n * ```typescript\n * import * as Sentry from \"@sentry/node\";\n *\n * getSentrySink({ sentry: Sentry });\n * ```\n *\n * @default `@sentry/core`\n * @since 2.2.0\n */\n sentry?: SentryNamespace;\n\n /**\n * Enable automatic breadcrumb creation for log events.\n *\n * When enabled, all logs become breadcrumbs in Sentry's isolation scope,\n * providing a complete context trail when errors occur. Breadcrumbs are\n * lightweight and only appear in error reports for debugging.\n *\n * @default false\n * @since 1.3.0\n */\n enableBreadcrumbs?: boolean;\n\n /**\n * Optional hook to transform or filter records before sending to Sentry.\n * Return `null` to drop the record.\n *\n * @since 1.3.0\n */\n beforeSend?: (record: LogRecord) => LogRecord | null;\n}\n\n/**\n * Gets a LogTape sink that sends logs to Sentry.\n *\n * This sink uses Sentry's global capture functions from `@sentry/core` by\n * default, following Sentry v8+ best practices. Simply call `Sentry.init()`\n * before creating the sink, and it will automatically use your initialized\n * client when both packages resolve the same Sentry module instance.\n *\n * @param optionsOrClient Optional configuration. Can be:\n * - Omitted: Uses global Sentry functions (recommended)\n * - Object with options: Configure sink behavior\n * - Object with `sentry`: Use an application-provided Sentry SDK namespace\n * - Sentry client instance: Backward compatibility (deprecated)\n * @returns A LogTape sink that sends logs to Sentry.\n *\n * @example Recommended usage - no parameters\n * ```typescript\n * import { configure } from \"@logtape/logtape\";\n * import { getSentrySink } from \"@logtape/sentry\";\n * import * as Sentry from \"@sentry/node\";\n *\n * Sentry.init({ dsn: process.env.SENTRY_DSN });\n *\n * await configure({\n * sinks: {\n * sentry: getSentrySink(), // That's it!\n * },\n * loggers: [\n * { category: [], sinks: [\"sentry\"], lowestLevel: \"error\" },\n * ],\n * });\n * ```\n *\n * @example With an application-provided Sentry namespace\n * ```typescript\n * import { configure } from \"@logtape/logtape\";\n * import { getSentrySink } from \"@logtape/sentry\";\n * import * as Sentry from \"@sentry/nextjs\";\n *\n * Sentry.init({ dsn: process.env.SENTRY_DSN });\n *\n * await configure({\n * sinks: {\n * sentry: getSentrySink({ sentry: Sentry }),\n * },\n * loggers: [\n * { category: [], sinks: [\"sentry\"], lowestLevel: \"error\" },\n * ],\n * });\n * ```\n *\n * @example With options\n * ```typescript\n * import * as Sentry from \"@sentry/node\";\n * Sentry.init({ dsn: process.env.SENTRY_DSN });\n *\n * await configure({\n * sinks: {\n * sentry: getSentrySink({\n * enableBreadcrumbs: true,\n * }),\n * },\n * loggers: [\n * { category: [], sinks: [\"sentry\"], lowestLevel: \"info\" },\n * ],\n * });\n * ```\n *\n * @example Edge functions - must flush before termination\n * ```typescript\n * // Cloudflare Workers\n * export default {\n * async fetch(request, env, ctx) {\n * logger.error(\"Something happened\");\n * ctx.waitUntil(Sentry.flush(2000)); // Don't block response\n * return new Response(\"OK\");\n * }\n * };\n * ```\n *\n * @example Legacy usage (v1.1.x - deprecated)\n * ```typescript\n * import { getClient } from \"@sentry/node\";\n * const client = getClient();\n * getSentrySink(client); // Still works but shows deprecation warning\n * ```\n *\n * @since 1.0.0\n */\nexport function getSentrySink(\n optionsOrClient?: SentrySinkOptions | SentryInstance,\n): Sink {\n let legacyClient: SentryInstance | undefined;\n let options: SentrySinkOptions = {};\n\n // Detect which API pattern is being used\n if (optionsOrClient == null) {\n // Pattern: getSentrySink() - no params (RECOMMENDED)\n // Use global functions\n } else if (\n typeof optionsOrClient === \"object\" &&\n \"captureMessage\" in optionsOrClient &&\n typeof optionsOrClient.captureMessage === \"function\"\n ) {\n // Pattern: getSentrySink(client) - DEPRECATED (v1.1.x backward compatibility)\n getLogger([\"logtape\", \"meta\", \"sentry\"]).warn(\n \"Passing a client directly is deprecated. \" +\n \"Use getSentrySink({ sentry: Sentry }) instead.\",\n );\n legacyClient = optionsOrClient as SentryInstance;\n } else if (typeof optionsOrClient === \"object\") {\n // Pattern: getSentrySink({ options }) - options object\n options = optionsOrClient as SentrySinkOptions;\n } else {\n throw new Error(\n `[@logtape/sentry] Invalid parameter (type: ${typeof optionsOrClient}).\\n\\n` +\n \"Expected one of:\\n\" +\n \" getSentrySink() // Recommended\\n\" +\n \" getSentrySink({ options }) // With options\\n\" +\n \" getSentrySink({ sentry }) // With a Sentry SDK namespace\\n\" +\n \" getSentrySink(client) // Deprecated (v1.1.x compat)\\n\",\n );\n }\n\n const sentry = options.sentry ?? SentryCore;\n\n // Choose which Sentry functions to use:\n // - For capture functions: use client if provided (v1.1.x compat),\n // otherwise the configured SDK namespace.\n // - For scope operations: use the configured SDK namespace because clients\n // don't expose current scope/span APIs.\n const captureMessage = legacyClient\n ? (msg: ParameterizedString, ctx?: unknown) =>\n legacyClient.captureMessage(String(msg), ctx)\n : sentry.captureMessage;\n const captureException = legacyClient\n ? (exception: unknown, hint?: unknown) =>\n legacyClient.captureException(exception, hint)\n : sentry.captureException;\n\n return (record: LogRecord) => {\n try {\n // Skip meta logger records to prevent infinite recursion\n const { category } = record;\n if (\n category[0] === \"logtape\" && category[1] === \"meta\" &&\n category[2] === \"sentry\"\n ) {\n return;\n }\n\n // Optional transformation/filtering\n const transformed = options.beforeSend\n ? options.beforeSend(record)\n : record;\n if (transformed == null) return;\n\n // Parameterized message for structured logging and events\n const paramMessage = getParameterizedString(transformed);\n const message = paramMessage.toString();\n\n // Level mapping\n const eventLevel = mapLevelForEvents(transformed.level);\n\n // Enriched structured attributes\n const attributes = {\n ...transformed.properties,\n \"sentry.origin\": \"auto.logging.logtape\",\n category: transformed.category.join(\".\"),\n timestamp: transformed.timestamp,\n } as Record<string, unknown>;\n\n // After enriched attributes\n const activeSpan = sentry.getActiveSpan();\n if (activeSpan) {\n const spanCtx = activeSpan.spanContext();\n attributes.trace_id = spanCtx.traceId;\n attributes.span_id = spanCtx.spanId;\n if (\"parentSpanId\" in spanCtx) {\n attributes.parent_span_id = spanCtx.parentSpanId; // Optional\n }\n }\n\n // Send structured log if Sentry logging is enabled (v9.41.0+)\n // Uses public logger API when available (SDK 9.41.0+)\n const client = sentry.getClient();\n if (client) {\n const { enableLogs, _experiments } = client.getOptions();\n const loggingEnabled = enableLogs ?? _experiments?.enableLogs;\n\n const sentryLogger = sentry.logger as SentryNamespace[\"logger\"];\n if (loggingEnabled && sentryLogger != null) {\n const logLevel = mapLevelForLogs(transformed.level);\n const logFn = sentryLogger[logLevel];\n if (typeof logFn === \"function\") {\n logFn(paramMessage, attributes);\n }\n }\n }\n\n // Capture as Sentry event (Issue) based on level and error presence\n // Use compareLogLevel() to handle future severity level additions\n const isErrorLevel = compareLogLevel(transformed.level, \"error\") >= 0;\n const errorProperty = getErrorProperty(transformed.properties);\n\n if (isErrorLevel && errorProperty != null) {\n // Error instance at error/fatal level -> captureException for stack trace\n const [property, error] = errorProperty;\n const rest = { ...attributes };\n delete rest[property];\n captureException(error, {\n level: eventLevel,\n extra: { message, ...rest },\n });\n } else if (isErrorLevel) {\n // Error/fatal level without Error instance -> captureMessage as Issue\n captureMessage(paramMessage, {\n level: eventLevel,\n extra: attributes,\n });\n } else if (options.enableBreadcrumbs) {\n // Non-error levels -> breadcrumbs only (if enabled)\n const isolationScope = sentry.getIsolationScope();\n isolationScope?.addBreadcrumb({\n category: transformed.category.join(\".\"),\n level: eventLevel,\n message,\n timestamp: transformed.timestamp / 1000,\n data: attributes,\n });\n }\n } catch (error) {\n getLogger([\"logtape\", \"meta\", \"sentry\"]).error(\n \"Failed to send log events to Sentry\",\n { error },\n );\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AA4BA,SAAS,uBAAuBA,QAAwC;CACtE,IAAI,SAAS;CACb,IAAI,YAAY;CAChB,MAAMC,YAAsB,CAAE;AAC9B,MAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,QAAQ,IACzC,KAAI,IAAI,MAAM,GAAG;AACf,YAAU,OAAO,QAAQ;AACzB,eAAa,OAAO,OAAO,QAAQ,GAAG,CAAC,WAAW,KAAK,KAAK;CAC7D,OAAM;EACL,MAAM,QAAQ,QAAQ,OAAO,QAAQ,GAAG;AACxC,YAAU;AACV,gBAAc;AACd,YAAU,KAAK,MAAM;CACtB;CAEH,MAAM,WAAW,IAAI,OAAO;AAC5B,UAAS,6BAA6B;AACtC,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c;KAC5B,UAAU,YAAY,SAAS,KAAK,IAAI;KACxC,OAAO;KACP;KACA,WAAW,YAAY,YAAY;KACnC,MAAM;IACP,EAAC;GACH;EACF,SAAQ,OAAO;AACd,aAAU;IAAC;IAAW;IAAQ;GAAS,EAAC,CAAC,MACvC,uCACA,EAAE,MAAO,EACV;EACF;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"mod.js","names":["record: LogRecord","tplValues: string[]","level: LogLevel","properties: Readonly<Record<string, unknown>>","propertyNames: readonly string[]","optionsOrClient?: SentrySinkOptions | SentryInstance","legacyClient: SentryInstance | undefined","options: SentrySinkOptions","msg: ParameterizedString","ctx?: unknown","exception: unknown","hint?: unknown"],"sources":["../src/mod.ts"],"sourcesContent":["import {\n compareLogLevel,\n getLogger,\n type LogLevel,\n type LogRecord,\n type Sink,\n} from \"@logtape/logtape\";\nimport type {\n LogSeverityLevel,\n ParameterizedString,\n SeverityLevel,\n} from \"@sentry/core\";\n// Import namespace to safely check for public logger API (added in v9.41.0)\nimport * as SentryCore from \"@sentry/core\";\n// Cross-runtime inspect: Deno.inspect / util.inspect (handles circular\n// references); falls back to JSON.stringify in browsers. Resolved via the\n// `#util` import map per runtime.\nimport { inspect } from \"#util\";\n\n/**\n * Converts a LogTape {@link LogRecord} into a Sentry {@link ParameterizedString}.\n *\n * This preserves the template structure for better message grouping in Sentry,\n * allowing similar messages with different values to be grouped together.\n *\n * @param record The log record to convert.\n * @returns A parameterized string with template and values.\n */\nfunction getParameterizedString(record: LogRecord): ParameterizedString {\n let result = \"\";\n let tplString = \"\";\n const tplValues: string[] = [];\n for (let i = 0; i < record.message.length; i++) {\n if (i % 2 === 0) {\n result += record.message[i];\n tplString += String(record.message[i]).replaceAll(\"%\", \"%%\");\n } else {\n const value = inspect(record.message[i]);\n result += value;\n tplString += `%s`;\n tplValues.push(value);\n }\n }\n const paramStr = new String(result) as ParameterizedString;\n paramStr.__sentry_template_string__ = tplString;\n paramStr.__sentry_template_values__ = tplValues;\n return paramStr;\n}\n\n// Level normalization helpers\n\nfunction mapLevelForEvents(level: LogLevel): SeverityLevel {\n switch (level) {\n case \"trace\":\n return \"debug\";\n default:\n return level as SeverityLevel; // debug | info | error | fatal\n }\n}\n\nfunction mapLevelForLogs(level: LogLevel): LogSeverityLevel {\n switch (level) {\n case \"trace\":\n return \"debug\";\n case \"warning\":\n return \"warn\";\n case \"debug\":\n case \"info\":\n case \"error\":\n case \"fatal\":\n return level;\n default:\n return \"info\"; // fallback\n }\n}\n\nconst defaultErrorPropertyNames = [\"error\", \"err\"] as const;\n\nfunction getErrorProperty(\n properties: Readonly<Record<string, unknown>>,\n propertyNames: readonly string[],\n): readonly [property: string, error: Error] | undefined {\n for (const property of propertyNames) {\n if (properties[property] instanceof Error) {\n return [property, properties[property]];\n }\n }\n return undefined;\n}\n\n/**\n * A Sentry client instance type (used for v1.1.x backward compatibility).\n *\n * Client instances only support `captureMessage` and `captureException`.\n * For scope operations (breadcrumbs, user context, traces), the sink always\n * uses global functions from `@sentry/core`.\n *\n * @deprecated This is only used for backward compatibility with v1.1.x.\n * New code should use `getSentrySink()` without parameters, which automatically\n * uses Sentry's global functions.\n *\n * @since 1.3.0\n */\nexport interface SentryInstance {\n captureMessage: (\n message: string,\n captureContext?: SeverityLevel | unknown,\n ) => string;\n captureException: (exception: unknown, hint?: unknown) => string;\n}\n\n/**\n * A Sentry SDK namespace object.\n *\n * Pass the namespace imported by your application when *@logtape/sentry* should\n * use the same Sentry module instance that initialized your app, for example\n * `import * as Sentry from \"@sentry/node\"`.\n *\n * @since 2.2.0\n */\nexport interface SentryNamespace {\n /**\n * Captures a message event and sends it to Sentry.\n */\n captureMessage(\n message: ParameterizedString,\n captureContext?: SeverityLevel | unknown,\n ): string;\n\n /**\n * Captures an exception event and sends it to Sentry.\n */\n captureException(exception: unknown, hint?: unknown): string;\n\n /**\n * Gets the currently active span, if any.\n */\n getActiveSpan():\n | {\n spanContext: () => {\n traceId: string;\n spanId: string;\n parentSpanId?: string;\n };\n }\n | undefined;\n\n /**\n * Gets the currently active Sentry client, if any.\n */\n getClient():\n | {\n getOptions: () => {\n enableLogs?: boolean;\n _experiments?: {\n enableLogs?: boolean;\n };\n };\n }\n | undefined;\n\n /**\n * Gets the current isolation scope.\n */\n getIsolationScope():\n | {\n addBreadcrumb: (breadcrumb: {\n category: string;\n level: SeverityLevel;\n message: string;\n timestamp: number;\n data: Record<string, unknown>;\n }) => void;\n }\n | undefined;\n\n /**\n * Sentry's structured logging API, available in Sentry SDK 9.41.0+.\n */\n logger?: Partial<\n Record<\n LogSeverityLevel,\n (\n message: ParameterizedString,\n attributes: Record<string, unknown>,\n ) => void\n >\n >;\n}\n\n/**\n * Options for configuring the Sentry sink.\n * @since 1.3.0\n */\nexport interface SentrySinkOptions {\n /**\n * Sentry SDK namespace to use for capture, scope, span, and structured log\n * APIs.\n *\n * This is useful when your application initializes Sentry through a framework\n * SDK such as `@sentry/nextjs` or `@sentry/react-native`, and\n * *@logtape/sentry* resolves a different `@sentry/core` module instance.\n *\n * @example\n * ```typescript\n * import * as Sentry from \"@sentry/node\";\n *\n * getSentrySink({ sentry: Sentry });\n * ```\n *\n * @default `@sentry/core`\n * @since 2.2.0\n */\n sentry?: SentryNamespace;\n\n /**\n * Enable automatic breadcrumb creation for log events.\n *\n * When enabled, all logs become breadcrumbs in Sentry's isolation scope,\n * providing a complete context trail when errors occur. Breadcrumbs are\n * lightweight and only appear in error reports for debugging.\n *\n * @default false\n * @since 1.3.0\n */\n enableBreadcrumbs?: boolean;\n\n /**\n * Property names to inspect for an `Error` instance when deciding whether\n * error-level records should be sent through Sentry's `captureException()`.\n *\n * Names are checked in order, and the first property containing an `Error`\n * instance is used as the captured exception. Set this to a custom list when\n * your application or logger stores the primary exception under another name.\n *\n * @default `[\"error\", \"err\"]`\n * @since 2.3.0\n */\n errorPropertyNames?: readonly string[];\n\n /**\n * Optional hook to transform or filter records before sending to Sentry.\n * Return `null` to drop the record.\n *\n * @since 1.3.0\n */\n beforeSend?: (record: LogRecord) => LogRecord | null;\n}\n\n/**\n * Gets a LogTape sink that sends logs to Sentry.\n *\n * This sink uses Sentry's global capture functions from `@sentry/core` by\n * default, following Sentry v8+ best practices. Simply call `Sentry.init()`\n * before creating the sink, and it will automatically use your initialized\n * client when both packages resolve the same Sentry module instance.\n *\n * @param optionsOrClient Optional configuration. Can be:\n * - Omitted: Uses global Sentry functions (recommended)\n * - Object with options: Configure sink behavior\n * - Object with `sentry`: Use an application-provided Sentry SDK namespace\n * - Sentry client instance: Backward compatibility (deprecated)\n * @returns A LogTape sink that sends logs to Sentry.\n *\n * @example Recommended usage - no parameters\n * ```typescript\n * import { configure } from \"@logtape/logtape\";\n * import { getSentrySink } from \"@logtape/sentry\";\n * import * as Sentry from \"@sentry/node\";\n *\n * Sentry.init({ dsn: process.env.SENTRY_DSN });\n *\n * await configure({\n * sinks: {\n * sentry: getSentrySink(), // That's it!\n * },\n * loggers: [\n * { category: [], sinks: [\"sentry\"], lowestLevel: \"error\" },\n * ],\n * });\n * ```\n *\n * @example With an application-provided Sentry namespace\n * ```typescript\n * import { configure } from \"@logtape/logtape\";\n * import { getSentrySink } from \"@logtape/sentry\";\n * import * as Sentry from \"@sentry/nextjs\";\n *\n * Sentry.init({ dsn: process.env.SENTRY_DSN });\n *\n * await configure({\n * sinks: {\n * sentry: getSentrySink({ sentry: Sentry }),\n * },\n * loggers: [\n * { category: [], sinks: [\"sentry\"], lowestLevel: \"error\" },\n * ],\n * });\n * ```\n *\n * @example With options\n * ```typescript\n * import * as Sentry from \"@sentry/node\";\n * Sentry.init({ dsn: process.env.SENTRY_DSN });\n *\n * await configure({\n * sinks: {\n * sentry: getSentrySink({\n * enableBreadcrumbs: true,\n * }),\n * },\n * loggers: [\n * { category: [], sinks: [\"sentry\"], lowestLevel: \"info\" },\n * ],\n * });\n * ```\n *\n * @example Edge functions - must flush before termination\n * ```typescript\n * // Cloudflare Workers\n * export default {\n * async fetch(request, env, ctx) {\n * logger.error(\"Something happened\");\n * ctx.waitUntil(Sentry.flush(2000)); // Don't block response\n * return new Response(\"OK\");\n * }\n * };\n * ```\n *\n * @example Legacy usage (v1.1.x - deprecated)\n * ```typescript\n * import { getClient } from \"@sentry/node\";\n * const client = getClient();\n * getSentrySink(client); // Still works but shows deprecation warning\n * ```\n *\n * @since 1.0.0\n */\nexport function getSentrySink(\n optionsOrClient?: SentrySinkOptions | SentryInstance,\n): Sink {\n let legacyClient: SentryInstance | undefined;\n let options: SentrySinkOptions = {};\n\n // Detect which API pattern is being used\n if (optionsOrClient == null) {\n // Pattern: getSentrySink() - no params (RECOMMENDED)\n // Use global functions\n } else if (\n typeof optionsOrClient === \"object\" &&\n \"captureMessage\" in optionsOrClient &&\n typeof optionsOrClient.captureMessage === \"function\"\n ) {\n // Pattern: getSentrySink(client) - DEPRECATED (v1.1.x backward compatibility)\n getLogger([\"logtape\", \"meta\", \"sentry\"]).warn(\n \"Passing a client directly is deprecated. \" +\n \"Use getSentrySink({ sentry: Sentry }) instead.\",\n );\n legacyClient = optionsOrClient as SentryInstance;\n } else if (typeof optionsOrClient === \"object\") {\n // Pattern: getSentrySink({ options }) - options object\n options = optionsOrClient as SentrySinkOptions;\n } else {\n throw new Error(\n `[@logtape/sentry] Invalid parameter (type: ${typeof optionsOrClient}).\\n\\n` +\n \"Expected one of:\\n\" +\n \" getSentrySink() // Recommended\\n\" +\n \" getSentrySink({ options }) // With options\\n\" +\n \" getSentrySink({ sentry }) // With a Sentry SDK namespace\\n\" +\n \" getSentrySink(client) // Deprecated (v1.1.x compat)\\n\",\n );\n }\n\n const sentry = options.sentry ?? SentryCore;\n\n // Choose which Sentry functions to use:\n // - For capture functions: use client if provided (v1.1.x compat),\n // otherwise the configured SDK namespace.\n // - For scope operations: use the configured SDK namespace because clients\n // don't expose current scope/span APIs.\n const captureMessage = legacyClient\n ? (msg: ParameterizedString, ctx?: unknown) =>\n legacyClient.captureMessage(String(msg), ctx)\n : sentry.captureMessage;\n const captureException = legacyClient\n ? (exception: unknown, hint?: unknown) =>\n legacyClient.captureException(exception, hint)\n : sentry.captureException;\n\n return (record: LogRecord) => {\n try {\n // Skip meta logger records to prevent infinite recursion\n const { category } = record;\n if (\n category[0] === \"logtape\" && category[1] === \"meta\" &&\n category[2] === \"sentry\"\n ) {\n return;\n }\n\n // Optional transformation/filtering\n const transformed = options.beforeSend\n ? options.beforeSend(record)\n : record;\n if (transformed == null) return;\n\n // Parameterized message for structured logging and events\n const paramMessage = getParameterizedString(transformed);\n const message = paramMessage.toString();\n\n // Level mapping\n const eventLevel = mapLevelForEvents(transformed.level);\n\n // Enriched structured attributes\n const attributes = {\n ...transformed.properties,\n \"sentry.origin\": \"auto.logging.logtape\",\n category: transformed.category.join(\".\"),\n timestamp: transformed.timestamp,\n } as Record<string, unknown>;\n\n // After enriched attributes\n const activeSpan = sentry.getActiveSpan();\n if (activeSpan) {\n const spanCtx = activeSpan.spanContext();\n attributes.trace_id = spanCtx.traceId;\n attributes.span_id = spanCtx.spanId;\n if (\"parentSpanId\" in spanCtx) {\n attributes.parent_span_id = spanCtx.parentSpanId; // Optional\n }\n }\n\n // Send structured log if Sentry logging is enabled (v9.41.0+)\n // Uses public logger API when available (SDK 9.41.0+)\n const client = sentry.getClient();\n if (client) {\n const { enableLogs, _experiments } = client.getOptions();\n const loggingEnabled = enableLogs ?? _experiments?.enableLogs;\n\n const sentryLogger = sentry.logger as SentryNamespace[\"logger\"];\n if (loggingEnabled && sentryLogger != null) {\n const logLevel = mapLevelForLogs(transformed.level);\n const logFn = sentryLogger[logLevel];\n if (typeof logFn === \"function\") {\n logFn(paramMessage, attributes);\n }\n }\n }\n\n // Capture as Sentry event (Issue) based on level and error presence\n // Use compareLogLevel() to handle future severity level additions\n const isErrorLevel = compareLogLevel(transformed.level, \"error\") >= 0;\n const errorProperty = getErrorProperty(\n transformed.properties,\n options.errorPropertyNames ?? defaultErrorPropertyNames,\n );\n\n if (isErrorLevel && errorProperty != null) {\n // Error instance at error/fatal level -> captureException for stack trace\n const [property, error] = errorProperty;\n const rest = { ...attributes };\n delete rest[property];\n captureException(error, {\n level: eventLevel,\n extra: { message, ...rest },\n });\n } else if (isErrorLevel) {\n // Error/fatal level without Error instance -> captureMessage as Issue\n captureMessage(paramMessage, {\n level: eventLevel,\n extra: attributes,\n });\n } else if (options.enableBreadcrumbs) {\n // Non-error levels -> breadcrumbs only (if enabled)\n const isolationScope = sentry.getIsolationScope();\n isolationScope?.addBreadcrumb({\n category: transformed.category.join(\".\"),\n level: eventLevel,\n message,\n timestamp: transformed.timestamp / 1000,\n data: attributes,\n });\n }\n } catch (error) {\n getLogger([\"logtape\", \"meta\", \"sentry\"]).error(\n \"Failed to send log events to Sentry\",\n { error },\n );\n }\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AA4BA,SAAS,uBAAuBA,QAAwC;CACtE,IAAI,SAAS;CACb,IAAI,YAAY;CAChB,MAAMC,YAAsB,CAAE;AAC9B,MAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,QAAQ,IACzC,KAAI,IAAI,MAAM,GAAG;AACf,YAAU,OAAO,QAAQ;AACzB,eAAa,OAAO,OAAO,QAAQ,GAAG,CAAC,WAAW,KAAK,KAAK;CAC7D,OAAM;EACL,MAAM,QAAQ,QAAQ,OAAO,QAAQ,GAAG;AACxC,YAAU;AACV,gBAAc;AACd,YAAU,KAAK,MAAM;CACtB;CAEH,MAAM,WAAW,IAAI,OAAO;AAC5B,UAAS,6BAA6B;AACtC,UAAS,6BAA6B;AACtC,QAAO;AACR;AAID,SAAS,kBAAkBC,OAAgC;AACzD,SAAQ,OAAR;EACE,KAAK,QACH,QAAO;EACT,QACE,QAAO;CACV;AACF;AAED,SAAS,gBAAgBA,OAAmC;AAC1D,SAAQ,OAAR;EACE,KAAK,QACH,QAAO;EACT,KAAK,UACH,QAAO;EACT,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,QACH,QAAO;EACT,QACE,QAAO;CACV;AACF;AAED,MAAM,4BAA4B,CAAC,S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sentry",
|
|
3
|
-
"version": "2.3.0-dev.
|
|
3
|
+
"version": "2.3.0-dev.840+34e837bf",
|
|
4
4
|
"description": "LogTape Sentry sink",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"LogTape",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
],
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"@sentry/core": ">=8.0.0",
|
|
72
|
-
"@logtape/logtape": "^2.3.0-dev.
|
|
72
|
+
"@logtape/logtape": "^2.3.0-dev.840+34e837bf"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@sentry/core": "^9.41.0",
|