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
| Argument | Type | Required | Notes |
|---|---|---|---|
dto.timestamp | string | Yes | Event timestamp. |
dto.service | string | Yes | Service name. |
dto.request_id | string | Yes | Request correlation identifier. |
dto.event_type | string | Yes | Event name. |
dto.subtype | string | No | Optional subtype. |
dto.status | string | Yes | Event status. |
dto.metadata | Record<string, unknown> | Yes | Event 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',
}