Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix log parameter types???
  • Loading branch information
mydea authored and s1gr1d committed Oct 16, 2025
commit 996220411a3eb8787264d4f42f5c801455cda0b3
25 changes: 20 additions & 5 deletions packages/node-core/src/logs/capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { _INTERNAL_captureLog } from '@sentry/core';
/**
* Additional metadata to capture the log with.
*/
interface CaptureLogMetadata {
export interface CaptureLogMetadata {
scope?: Scope;
}

Expand All @@ -26,10 +26,25 @@ export type CaptureLogArgs = CaptureLogArgWithTemplate | CaptureLogArgWithoutTem

/**
* Capture a log with the given level.
*
* @param level - The level of the log.
* @param message - The message to log.
* @param attributes - Arbitrary structured data that stores information about the log - e.g., userId: 100.
*/
export function captureLog(
level: LogSeverityLevel,
message: ParameterizedString,
attributes?: Log['attributes'],
metadata?: CaptureLogMetadata,
): void;
/**
* Capture a log with the given level.
*/
export function captureLog(
level: LogSeverityLevel,
messageTemplate: string,
messageParams: Array<unknown>,
attributes?: Log['attributes'],
metadata?: CaptureLogMetadata,
): void;
/**
* Capture a log with the given level.
*/
export function captureLog(level: LogSeverityLevel, ...args: CaptureLogArgs): void {
const [messageOrMessageTemplate, paramsOrAttributes, maybeAttributesOrMetadata, maybeMetadata] = args;
Expand Down
Loading