feat: add protocol interaction observability
This commit is contained in:
@@ -4,6 +4,7 @@ import { CurrentSessionUserId } from '../auth/current-session-user.decorator';
|
||||
import { RequireRecentAuthentication } from '../auth/require-recent-authentication.decorator';
|
||||
import { SendChainService } from '../send-chain/send-chain.service';
|
||||
import { OperationsService } from './operations.service';
|
||||
import { ProtocolLogsService } from '../protocol-logs/protocol-logs.service';
|
||||
|
||||
type DownloadResponse = {
|
||||
setHeader(name: string, value: number | string): void;
|
||||
@@ -259,7 +260,24 @@ export class AdminOperationsController {
|
||||
@ApiTags('admin-system-logs')
|
||||
@Controller('admin/system-logs')
|
||||
export class AdminSystemLogsController {
|
||||
constructor(private readonly operations: OperationsService) {}
|
||||
constructor(
|
||||
private readonly operations: OperationsService,
|
||||
private readonly protocolLogs: ProtocolLogsService,
|
||||
) {}
|
||||
|
||||
@Get('protocol-interactions')
|
||||
protocolInteractions(
|
||||
@Query('protocol') protocol?: string,
|
||||
@Query('direction') direction?: string,
|
||||
@Query('eventType') eventType?: string,
|
||||
@Query('status') status?: string,
|
||||
@Query('keyword') keyword?: string,
|
||||
@Query('range') range?: string,
|
||||
@Query('page') page?: string,
|
||||
@Query('pageSize') pageSize?: string,
|
||||
) {
|
||||
return this.protocolLogs.list({ protocol, direction, eventType, status, keyword, range, page: Number(page), pageSize: Number(pageSize) });
|
||||
}
|
||||
|
||||
@Get()
|
||||
list(
|
||||
|
||||
Reference in New Issue
Block a user