Skip to content

feat(observability): export and display API logs and traces - #3366

Draft
AnuGayan wants to merge 10 commits into
wso2:mainfrom
AnuGayan:feat/apip-observability-traces
Draft

feat(observability): export and display API logs and traces#3366
AnuGayan wants to merge 10 commits into
wso2:mainfrom
AnuGayan:feat/apip-observability-traces

Conversation

@AnuGayan

@AnuGayan AnuGayan commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add API traffic log export and distributed trace configuration to the gateway runtime
  • expose organization and project observability capabilities through Platform API and its PDK
  • add tenant-aware log and trace views to the API control-plane portal
  • configure the portal BFF and runtime settings for the cloud observability endpoints

Verification

  • focused Go tests passed for gateway-controller config/xDS, policy-engine config/tracing, Platform API server/service, and control-plane BFF auth/config/server
  • verified the branch merges cleanly with current main
  • confirmed no new test files are included

AnuGayan and others added 10 commits September 3, 2026 15:26
Replaces the card-per-record gateway log list with a terminal-style console
so operators can select a range of lines and copy them out as usable text,
and watch new records arrive without re-running the query.

- Add LogConsole: a fixed-width, level-coloured output surface. Rows are
  plain text nodes in a `white-space: pre` block with column padding inside
  the text nodes, because flex columns and virtualisation both turn a dragged
  selection into unusable copy. Ships copy-all, wrap and raw-payload toggles,
  clear, and a follow that pins on scroll-up so incoming lines cannot yank
  the view out from under a selection.
- Add `useObservabilityLogTail`, which resolves its time window inside
  `queryFn` from a window length rather than baking absolute bounds into the
  query key; a key carrying bounds would allocate a fresh cache entry per
  poll and never reuse its own data. Polls every 5s while live and pauses on
  a hidden tab.
- Move traffic-log parsing out of the page into logLines, and add
  `mergeLogLines`, which appends only new records against a content-derived
  identity, sorts each newest-first page ascending, honours a clear
  watermark, and caps the buffer at 2000 rows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…levels

The Project, Component and Level dropdowns rendered a zero-width space
instead of their selected default, so "All projects", "All components" and
"All levels" read as empty boxes. MUI's Select only computes a display value
when `isFilled({value})` holds, and an empty string is not filled, so each
default needs `displayEmpty` — and the multi-select needs `renderValue` on
top, which `displayEmpty` alone does not cover.

Level becomes a true multi-select while it is at it: the wrapper handler
already reads a repeated `logLevel` parameter and accepts up to eight
distinct values, so this needs no backend change. An empty selection drops
the parameter rather than sending an empty one.

Also records why Component stays gated on Project: the REST API list
endpoint is project-scoped, so `useRestApis` is disabled without one and
ungating the select would only offer an empty list.

Project and Component filters still narrow server-side to lines containing
the project's internal ID or the API context, which drops operational
records; that lives in apip-cloud-platform-api and is untouched here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant