feat: exchange-level log viewer on ExchangeDetail page
All checks were successful
CI / build (push) Successful in 1m0s
CI / cleanup-branch (push) Has been skipped
CI / docker (push) Successful in 49s
CI / deploy (push) Successful in 37s
CI / deploy-feature (push) Has been skipped

Index exchangeId from Camel MDC (camel.exchangeId) as a top-level
keyword field in OpenSearch log indices. Add exchangeId filter to
the log query API and frontend hook. Show a LogViewer on the
ExchangeDetail page filtered to that exchange's logs, with search
input and level filter pills.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-26 10:26:30 +01:00
parent f9bd492191
commit ea665ff411
5 changed files with 190 additions and 6 deletions

View File

@@ -16,19 +16,20 @@ export interface LogEntryResponse {
export function useApplicationLogs(
application?: string,
agentId?: string,
options?: { limit?: number; toOverride?: string },
options?: { limit?: number; toOverride?: string; exchangeId?: string },
) {
const refetchInterval = useRefreshInterval(15_000);
const { timeRange } = useGlobalFilters();
const to = options?.toOverride ?? timeRange.end.toISOString();
return useQuery({
queryKey: ['logs', application, agentId, timeRange.start.toISOString(), to, options?.limit],
queryKey: ['logs', application, agentId, timeRange.start.toISOString(), to, options?.limit, options?.exchangeId],
queryFn: async () => {
const token = useAuthStore.getState().accessToken;
const params = new URLSearchParams();
params.set('application', application!);
if (agentId) params.set('agentId', agentId);
if (options?.exchangeId) params.set('exchangeId', options.exchangeId);
params.set('from', timeRange.start.toISOString());
params.set('to', to);
if (options?.limit) params.set('limit', String(options.limit));