Skip to main content

Tracker Scope

Source: src/sdk/tracker.ts

Use sdk.tracker to create tracker log messages through the current SDK route.

Methods

createLogMessage(dto: CreateLogMessageDto): Promise<{ message: string }>

Endpoint

POST v1/log-messages

How it works

Sends a log-message payload to the tracker service using the path currently implemented in the SDK.

Arguments

ArgumentTypeRequiredNotes
dto.timestampstringYesEvent timestamp.
dto.servicestringYesService name.
dto.request_idstringYesRequest correlation identifier.
dto.event_typestringYesEvent name.
dto.subtypestringNoOptional subtype.
dto.statusstringYesEvent status.
dto.metadataRecord<string, unknown>YesEvent metadata object.

Returns

Promise<{ message: string }>

Behavior Notes

  • This page documents the path exactly as implemented in the SDK: POST v1/log-messages.
  • Validation annotations exist on the DTO class, but the SDK method does not run validation before sending the request.

Request Example

const result = await sdk.tracker.createLogMessage({
timestamp: new Date().toISOString(),
service: 'payments-api',
request_id: 'req-123',
event_type: 'WITHDRAWAL_CREATED',
subtype: 'info',
status: 'success',
metadata: {
accountId: 'account-id',
transactionId: 'tx-id',
},
});

Response Example

{
message: 'Log message created successfully',
}