Skip to content

refactor: update observability filters to use component names instead of IDs#494

Merged
LakshanSS merged 5 commits intoopenchoreo:mainfrom
akila-i:obs-refactor-ids
Apr 7, 2026
Merged

refactor: update observability filters to use component names instead of IDs#494
LakshanSS merged 5 commits intoopenchoreo:mainfrom
akila-i:obs-refactor-ids

Conversation

@akila-i
Copy link
Copy Markdown
Contributor

@akila-i akila-i commented Apr 6, 2026

Purpose

This pull request refactors the way environments and components are represented and filtered in the Observability plugin, aiming for greater consistency and clarity across the codebase. The most significant changes include standardizing environment and component identifiers, updating filter interfaces and usage, and improving environment display names throughout the UI and tests.

Filter and Environment Refactoring:

  • The AlertsFilters and IncidentsFilters interfaces now use environment (string) instead of environmentId, and components (string array) instead of componentIds, for clarity and consistency across the codebase. All relevant usages in components, handlers, and tests have been updated accordingly. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19]
  • The environment objects now use name and displayName fields, removing the previous id and resourceName fields, and this is reflected in both the UI components and the test data. [1] [2] [3] [4]

UI and Display Improvements:

  • Environment dropdowns and displays now show the displayName if available, falling back to name otherwise, providing a more user-friendly label throughout the UI. [1] [2]
  • The ObservabilityNotConfiguredError now uses componentName instead of componentId for clearer error messages.

Test Data and Mocks Update:

  • All test mocks and fixtures have been updated to match the new environment and filter structure, ensuring accurate and robust test coverage. [1] [2] [3] [4] [5] [6] [7] [8]

Type and Import Clean-up:

  • Imports of the Environment type have been updated to use a centralized definition, reducing duplication and potential for drift. [1] [2] [3] [4]

API Parameter Simplification:

  • The getRuntimeLogs API and client now accept environment and project names directly, removing the need for separate IDs, which simplifies the API surface. [1] [2]

These changes collectively make the codebase more maintainable and ensure consistency in how environments and components are referenced and displayed throughout the Observability plugin.

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why there’s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

Summary by CodeRabbit

  • New Features

    • Environment display names now appear in observability filters and tables for clearer UI labels.
  • Refactor

    • Unified filter keys: environment selection now uses environment name and component selection uses component names across Alerts, Incidents, Runtime Logs, Traces, and Metrics.
    • Simplified runtime-logs flow and API usage to rely on names rather than derived identifiers, reducing configuration complexity.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

This PR renames filter fields (environmentId → environment, componentIds → components), switches environment URL handling to use environment.name, removes componentId/projectId/environmentId from getRuntimeLogs signature and callers, adds Environment.displayName, and updates all affected components, hooks, and tests accordingly.

Changes

Cohort / File(s) Summary
Backend service
plugins/openchoreo-observability-backend/src/services/ObservabilityService.ts
Changed ObservabilityNotConfiguredError constructor from componentIdcomponentName; include displayName when mapping environments from annotations.
Observability API
plugins/openchoreo-observability/src/api/ObservabilityApi.ts
Removed leading componentId, projectId, environmentId parameters from getRuntimeLogs (interface and client).
Global types & hooks
plugins/openchoreo-observability/src/types.ts, plugins/openchoreo-observability/src/hooks/*, plugins/openchoreo-observability/src/hooks/useUrlFilters*.ts
Renamed filter fields: componentIdscomponents, environmentId/environmentNameenvironment; updated URL parsing/serialization to treat env as name; adjusted hook option/result interfaces.
RuntimeLogs logic & pages
plugins/openchoreo-observability/src/components/RuntimeLogs/*.tsx, .../types.ts, .../ObservabilityRuntimeLogsPage*.tsx
Removed environment id/resourceName mapping, use env.name matching, emit/use filters.environment, filters.components; removed component/project discovery and dropped componentId/projectId from runtime logs flow.
Alerts & Incidents
plugins/openchoreo-observability/src/components/Alerts/*, .../Incidents/*, .../types.ts
Switch filters to environment and components; use env.name for selection keys and display `env.displayName
Traces & Metrics
plugins/openchoreo-observability/src/components/Traces/*, .../Metrics/ObservabilityMetricsPage.tsx
Component selection now uses components; metrics change-detection and traces selection updated to use environment/components names.
Integration usage
plugins/openchoreo/src/components/RuntimeLogs/OverviewCard/useLogsSummary.ts
Removed discoveryApi/fetchApi lookup; updated getRuntimeLogs call site to new signature (namespace/project/environmentName/componentName).
Tests
plugins/openchoreo-observability/src/**/*.test.tsx, plugins/openchoreo-observability/src/hooks/*.test.ts
Updated fixtures/mocks to use environment and components and richer environment objects (include displayName, namespace, isProduction, createdAt); adjusted expected getRuntimeLogs call arguments where applicable.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • sameerajayasoma
  • jhivandb
  • kaviththiranga

Poem

🐰
Hop, I rename and hop, I mend,
IDs to names — a gentler trend.
Display names bloom where once were keys,
Logs lighten up, filters float with ease.
A tiny rabbit cheers this tidy end 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description provides comprehensive documentation of changes with section 'Purpose' fully detailed and 'Filter and Environment Refactoring' section thoroughly explained with multiple references. However, critical template sections (Goals, Approach, Documentation, Training, Certification, Marketing, Samples, Migrations, Test environment) remain as unfilled placeholders. Complete the remaining required sections: provide concrete Goals, Implementation Approach, Documentation links, Test environment details, and other administrative sections beyond the purpose/current state description.
Docstring Coverage ⚠️ Warning Docstring coverage is 35.71% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main refactoring effort to standardize filter usage across the observability plugin, prioritizing component/environment names over IDs.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
plugins/openchoreo-observability/src/components/RuntimeLogs/LogsFilter.tsx (1)

136-156: ⚠️ Potential issue | 🟡 Minor

Render selected component labels with display names too.

The menu items now use component.displayName || component.name, but the closed multiselect still joins the raw stored names. After selection, the field flips back to internal names instead of the clearer labels this PR is introducing.

💡 Suggested fix
                 renderValue={selected => {
                   const selectedArray = selected as string[];
                   if (selectedArray.length === 0) return 'All';
-                  return selectedArray.join(', ');
+                  return selectedArray
+                    .map(
+                      name =>
+                        components.find(component => component.name === name)
+                          ?.displayName || name,
+                    )
+                    .join(', ');
                 }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/openchoreo-observability/src/components/RuntimeLogs/LogsFilter.tsx`
around lines 136 - 156, The closed multiselect currently shows raw internal
names because renderValue in the Select uses selected strings directly; update
renderValue to map each selected name to its user-friendly label by looking it
up in the components array (use component.displayName || component.name) before
joining, preserving the "All" when selected length is 0; reference the Select's
renderValue, the components array, filters.components and
MenuItem/component.displayName to locate and implement the change (ensure proper
typing/casting of selected as string[] and fallback to name when no
displayName).
plugins/openchoreo-observability/src/hooks/useTraces.ts (1)

54-68: ⚠️ Potential issue | 🟡 Minor

Deduplicate component filters before firing parallel trace requests.

A duplicated components entry in URL/state will now enqueue the same getTraces() call more than once. The later merge by traceId hides it, but it still adds avoidable backend load.

💡 Suggested fix
-      const selectedComponents = filters.components ?? [];
+      const selectedComponents = Array.from(
+        new Set(filters.components ?? []),
+      );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/openchoreo-observability/src/hooks/useTraces.ts` around lines 54 -
68, Deduplicate the component list before firing parallel requests: derive
selectedComponents from filters.components, remove duplicates (e.g., via Set or
Array.filter) and use that deduped array in the Promise.all call to
observabilityApi.getTraces so each component name is requested only once; update
references to selectedComponents (the map that calls
observabilityApi.getTraces(namespace, projectName, filters.environment.name,
name, ...)) to use the deduped array.
plugins/openchoreo/src/components/RuntimeLogs/OverviewCard/useLogsSummary.ts (1)

97-100: ⚠️ Potential issue | 🟠 Major

Stop sending the legacy environment field to getRuntimeLogs.

Line 100 still passes selectedEnv.resourceName, but the rest of this refactor moves observability lookups to the canonical environment name. That keeps the overview card pinned to the old shape and will break once client.getEnvironments(entity) returns { name, displayName } like the other observability paths. Please migrate this hook to the new environment model and pass the environment name here before merging.

Proposed fix
-        selectedEnv.resourceName,
+        selectedEnv.name,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/openchoreo/src/components/RuntimeLogs/OverviewCard/useLogsSummary.ts`
around lines 97 - 100, The hook useLogsSummary is still passing the legacy
environment field selectedEnv.resourceName into observabilityApi.getRuntimeLogs;
update the hook to use the canonical environment model and pass the environment
name (e.g., selectedEnv.name or the new environment property returned by
client.getEnvironments) instead of resourceName when calling
observabilityApi.getRuntimeLogs, and adjust any intermediate variables or types
within useLogsSummary that build the environment argument so the overview card
uses the new environment shape across this hook.
🧹 Nitpick comments (3)
plugins/openchoreo-observability/src/hooks/useRuntimeLogs.ts (1)

162-169: Avoid starting live polling when environment is unset.

When isLive is true but options.environment is empty, the interval still runs every 5s and only no-ops inside fetchLogs. Consider gating interval setup here too.

♻️ Suggested change
-    if (!options.isLive) {
+    if (!options.isLive || !options.environment) {
       return undefined;
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/openchoreo-observability/src/hooks/useRuntimeLogs.ts` around lines
162 - 169, The live-polling interval is started whenever options.isLive is true
even if options.environment is empty, causing a pointless interval that only
no-ops in fetchLogs; update the polling setup in useRuntimeLogs to only create
the interval when both options.isLive and options.environment are truthy (or
early-return when options.environment is falsy), use the same
pollingIntervalRef.current reference to set/clear the timer, and ensure you
clear any existing interval when environment becomes empty so fetchLogs is only
polled while options.environment is set.
plugins/openchoreo-observability/src/hooks/useUrlFilters.ts (1)

18-18: Minor: Update JSDoc to reflect the rename from IDs to names.

The comment says "Comma-separated component IDs" but the PR refactors to use component names instead of IDs.

📝 Suggested documentation fix
- * - `components`: Comma-separated component IDs
+ * - `components`: Comma-separated component names
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/openchoreo-observability/src/hooks/useUrlFilters.ts` at line 18,
Update the JSDoc in useUrlFilters.ts to reflect that the query param now uses
component names rather than IDs: change the `components` description from
"Comma-separated component IDs" to "Comma-separated component names" in the
JSDoc for the useUrlFilters hook (the `components` query param description) so
documentation matches the refactor.
plugins/openchoreo-observability/src/hooks/useProjectRuntimeLogs.ts (1)

13-15: Remove the duplicate components definition.

RuntimeLogsFilters already includes components?: string[], so redefining it here adds a second place to keep in sync without changing behavior.

♻️ Suggested simplification
-export interface ProjectRuntimeLogsFilters extends RuntimeLogsFilters {
-  components?: string[];
-}
+export type ProjectRuntimeLogsFilters = RuntimeLogsFilters;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/openchoreo-observability/src/hooks/useProjectRuntimeLogs.ts` around
lines 13 - 15, ProjectRuntimeLogsFilters redundantly redeclares components?:
string[] even though RuntimeLogsFilters already defines it; remove the
components property from the ProjectRuntimeLogsFilters interface so it simply
extends RuntimeLogsFilters, leaving any other custom properties (if any) intact
and ensuring code that references ProjectRuntimeLogsFilters continues to rely on
the inherited components field from RuntimeLogsFilters.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/openchoreo-observability/src/hooks/useUrlFiltersForRuntimeLogs.ts`:
- Around line 60-63: The components parsing keeps whitespace so values like
"foo, bar" yield " bar" and won't match downstream; update the logic in
useUrlFiltersForRuntimeLogs (where componentsParam and components are computed)
to trim each entry before filtering/using it (e.g., split on ',' then map(s =>
s.trim()) then filter(Boolean)) so entries are normalized the same way as
logLevel.

---

Outside diff comments:
In `@plugins/openchoreo-observability/src/components/RuntimeLogs/LogsFilter.tsx`:
- Around line 136-156: The closed multiselect currently shows raw internal names
because renderValue in the Select uses selected strings directly; update
renderValue to map each selected name to its user-friendly label by looking it
up in the components array (use component.displayName || component.name) before
joining, preserving the "All" when selected length is 0; reference the Select's
renderValue, the components array, filters.components and
MenuItem/component.displayName to locate and implement the change (ensure proper
typing/casting of selected as string[] and fallback to name when no
displayName).

In `@plugins/openchoreo-observability/src/hooks/useTraces.ts`:
- Around line 54-68: Deduplicate the component list before firing parallel
requests: derive selectedComponents from filters.components, remove duplicates
(e.g., via Set or Array.filter) and use that deduped array in the Promise.all
call to observabilityApi.getTraces so each component name is requested only
once; update references to selectedComponents (the map that calls
observabilityApi.getTraces(namespace, projectName, filters.environment.name,
name, ...)) to use the deduped array.

In
`@plugins/openchoreo/src/components/RuntimeLogs/OverviewCard/useLogsSummary.ts`:
- Around line 97-100: The hook useLogsSummary is still passing the legacy
environment field selectedEnv.resourceName into observabilityApi.getRuntimeLogs;
update the hook to use the canonical environment model and pass the environment
name (e.g., selectedEnv.name or the new environment property returned by
client.getEnvironments) instead of resourceName when calling
observabilityApi.getRuntimeLogs, and adjust any intermediate variables or types
within useLogsSummary that build the environment argument so the overview card
uses the new environment shape across this hook.

---

Nitpick comments:
In `@plugins/openchoreo-observability/src/hooks/useProjectRuntimeLogs.ts`:
- Around line 13-15: ProjectRuntimeLogsFilters redundantly redeclares
components?: string[] even though RuntimeLogsFilters already defines it; remove
the components property from the ProjectRuntimeLogsFilters interface so it
simply extends RuntimeLogsFilters, leaving any other custom properties (if any)
intact and ensuring code that references ProjectRuntimeLogsFilters continues to
rely on the inherited components field from RuntimeLogsFilters.

In `@plugins/openchoreo-observability/src/hooks/useRuntimeLogs.ts`:
- Around line 162-169: The live-polling interval is started whenever
options.isLive is true even if options.environment is empty, causing a pointless
interval that only no-ops in fetchLogs; update the polling setup in
useRuntimeLogs to only create the interval when both options.isLive and
options.environment are truthy (or early-return when options.environment is
falsy), use the same pollingIntervalRef.current reference to set/clear the
timer, and ensure you clear any existing interval when environment becomes empty
so fetchLogs is only polled while options.environment is set.

In `@plugins/openchoreo-observability/src/hooks/useUrlFilters.ts`:
- Line 18: Update the JSDoc in useUrlFilters.ts to reflect that the query param
now uses component names rather than IDs: change the `components` description
from "Comma-separated component IDs" to "Comma-separated component names" in the
JSDoc for the useUrlFilters hook (the `components` query param description) so
documentation matches the refactor.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 314ff97a-8968-4f5a-a030-6a417c9e0a90

📥 Commits

Reviewing files that changed from the base of the PR and between 54c20e0 and 4c7805b.

📒 Files selected for processing (39)
  • plugins/openchoreo-observability-backend/src/services/ObservabilityService.ts
  • plugins/openchoreo-observability/src/api/ObservabilityApi.ts
  • plugins/openchoreo-observability/src/components/Alerts/AlertsActions.test.tsx
  • plugins/openchoreo-observability/src/components/Alerts/AlertsFilter.test.tsx
  • plugins/openchoreo-observability/src/components/Alerts/AlertsFilter.tsx
  • plugins/openchoreo-observability/src/components/Alerts/ObservabilityAlertsPage.test.tsx
  • plugins/openchoreo-observability/src/components/Alerts/ObservabilityAlertsPage.tsx
  • plugins/openchoreo-observability/src/components/Alerts/types.ts
  • plugins/openchoreo-observability/src/components/Incidents/IncidentsActions.test.tsx
  • plugins/openchoreo-observability/src/components/Incidents/IncidentsFilter.test.tsx
  • plugins/openchoreo-observability/src/components/Incidents/IncidentsFilter.tsx
  • plugins/openchoreo-observability/src/components/Incidents/ObservabilityProjectIncidentsPage.test.tsx
  • plugins/openchoreo-observability/src/components/Incidents/ObservabilityProjectIncidentsPage.tsx
  • plugins/openchoreo-observability/src/components/Incidents/types.ts
  • plugins/openchoreo-observability/src/components/Metrics/ObservabilityMetricsPage.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/LogsActions.test.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/LogsFilter.test.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/LogsFilter.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityProjectRuntimeLogsPage.test.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityProjectRuntimeLogsPage.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityRuntimeLogsPage.test.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityRuntimeLogsPage.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/types.ts
  • plugins/openchoreo-observability/src/components/Traces/ObservabilityTracesPage.tsx
  • plugins/openchoreo-observability/src/components/Traces/TracesFilters.tsx
  • plugins/openchoreo-observability/src/hooks/useComponentAlerts.ts
  • plugins/openchoreo-observability/src/hooks/useFilters.ts
  • plugins/openchoreo-observability/src/hooks/useProjectIncidents.ts
  • plugins/openchoreo-observability/src/hooks/useProjectRuntimeLogs.test.ts
  • plugins/openchoreo-observability/src/hooks/useProjectRuntimeLogs.ts
  • plugins/openchoreo-observability/src/hooks/useRuntimeLogs.ts
  • plugins/openchoreo-observability/src/hooks/useTraces.test.ts
  • plugins/openchoreo-observability/src/hooks/useTraces.ts
  • plugins/openchoreo-observability/src/hooks/useUrlFilters.ts
  • plugins/openchoreo-observability/src/hooks/useUrlFiltersForAlerts.ts
  • plugins/openchoreo-observability/src/hooks/useUrlFiltersForIncidents.ts
  • plugins/openchoreo-observability/src/hooks/useUrlFiltersForRuntimeLogs.ts
  • plugins/openchoreo-observability/src/types.ts
  • plugins/openchoreo/src/components/RuntimeLogs/OverviewCard/useLogsSummary.ts
💤 Files with no reviewable changes (1)
  • plugins/openchoreo-observability/src/api/ObservabilityApi.ts

@akila-i akila-i force-pushed the obs-refactor-ids branch from 4062f55 to 2b0ac3a Compare April 6, 2026 11:52
akila-i added 5 commits April 6, 2026 22:00
Signed-off-by: Akila-I <akila.99g@gmail.com>
…nd hooks

- Changed environmentId to environment in incidents filter and related components.
- Updated tests to reflect the new environment property.
- Adjusted hooks and API calls to use the new environment structure.
- Modified environment mapping in runtime logs and incidents to use displayName.
- Ensured consistency across filters and state management for environment selection.

Signed-off-by: Akila-I <akila.99g@gmail.com>
Signed-off-by: Akila-I <akila.99g@gmail.com>
Signed-off-by: Akila-I <akila.99g@gmail.com>
…components

Signed-off-by: Akila-I <akila.99g@gmail.com>
@akila-i akila-i force-pushed the obs-refactor-ids branch from 2b0ac3a to 71c6625 Compare April 6, 2026 16:30
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
plugins/openchoreo/src/components/RuntimeLogs/OverviewCard/useLogsSummary.ts (1)

97-108: ⚠️ Potential issue | 🔴 Critical

Fix selectedEnv.resourceNameEnvironment type no longer has this property.

The Environment interface was updated to remove resourceName. Line 100 attempts to access selectedEnv.resourceName when calling getRuntimeLogs(), but the field no longer exists. Use selectedEnv.name instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/openchoreo/src/components/RuntimeLogs/OverviewCard/useLogsSummary.ts`
around lines 97 - 108, The call to observabilityApi.getRuntimeLogs in
useLogsSummary.ts uses selectedEnv.resourceName which no longer exists on
Environment; update the argument to use selectedEnv.name instead (i.e., replace
selectedEnv.resourceName with selectedEnv.name) so getRuntimeLogs receives the
environment name; ensure any related references in the useLogsSummary function
and its parameters reflect the Environment type change and compile.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@plugins/openchoreo/src/components/RuntimeLogs/OverviewCard/useLogsSummary.ts`:
- Around line 97-108: The call to observabilityApi.getRuntimeLogs in
useLogsSummary.ts uses selectedEnv.resourceName which no longer exists on
Environment; update the argument to use selectedEnv.name instead (i.e., replace
selectedEnv.resourceName with selectedEnv.name) so getRuntimeLogs receives the
environment name; ensure any related references in the useLogsSummary function
and its parameters reflect the Environment type change and compile.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d336e578-f4e3-4c57-abea-ecd3983f5be7

📥 Commits

Reviewing files that changed from the base of the PR and between 4c7805b and 71c6625.

📒 Files selected for processing (39)
  • plugins/openchoreo-observability-backend/src/services/ObservabilityService.ts
  • plugins/openchoreo-observability/src/api/ObservabilityApi.ts
  • plugins/openchoreo-observability/src/components/Alerts/AlertsActions.test.tsx
  • plugins/openchoreo-observability/src/components/Alerts/AlertsFilter.test.tsx
  • plugins/openchoreo-observability/src/components/Alerts/AlertsFilter.tsx
  • plugins/openchoreo-observability/src/components/Alerts/ObservabilityAlertsPage.test.tsx
  • plugins/openchoreo-observability/src/components/Alerts/ObservabilityAlertsPage.tsx
  • plugins/openchoreo-observability/src/components/Alerts/types.ts
  • plugins/openchoreo-observability/src/components/Incidents/IncidentsActions.test.tsx
  • plugins/openchoreo-observability/src/components/Incidents/IncidentsFilter.test.tsx
  • plugins/openchoreo-observability/src/components/Incidents/IncidentsFilter.tsx
  • plugins/openchoreo-observability/src/components/Incidents/ObservabilityProjectIncidentsPage.test.tsx
  • plugins/openchoreo-observability/src/components/Incidents/ObservabilityProjectIncidentsPage.tsx
  • plugins/openchoreo-observability/src/components/Incidents/types.ts
  • plugins/openchoreo-observability/src/components/Metrics/ObservabilityMetricsPage.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/LogsActions.test.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/LogsFilter.test.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/LogsFilter.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityProjectRuntimeLogsPage.test.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityProjectRuntimeLogsPage.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityRuntimeLogsPage.test.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityRuntimeLogsPage.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/types.ts
  • plugins/openchoreo-observability/src/components/Traces/ObservabilityTracesPage.tsx
  • plugins/openchoreo-observability/src/components/Traces/TracesFilters.tsx
  • plugins/openchoreo-observability/src/hooks/useComponentAlerts.ts
  • plugins/openchoreo-observability/src/hooks/useFilters.ts
  • plugins/openchoreo-observability/src/hooks/useProjectIncidents.ts
  • plugins/openchoreo-observability/src/hooks/useProjectRuntimeLogs.test.ts
  • plugins/openchoreo-observability/src/hooks/useProjectRuntimeLogs.ts
  • plugins/openchoreo-observability/src/hooks/useRuntimeLogs.ts
  • plugins/openchoreo-observability/src/hooks/useTraces.test.ts
  • plugins/openchoreo-observability/src/hooks/useTraces.ts
  • plugins/openchoreo-observability/src/hooks/useUrlFilters.ts
  • plugins/openchoreo-observability/src/hooks/useUrlFiltersForAlerts.ts
  • plugins/openchoreo-observability/src/hooks/useUrlFiltersForIncidents.ts
  • plugins/openchoreo-observability/src/hooks/useUrlFiltersForRuntimeLogs.ts
  • plugins/openchoreo-observability/src/types.ts
  • plugins/openchoreo/src/components/RuntimeLogs/OverviewCard/useLogsSummary.ts
💤 Files with no reviewable changes (1)
  • plugins/openchoreo-observability/src/api/ObservabilityApi.ts
✅ Files skipped from review due to trivial changes (11)
  • plugins/openchoreo-observability/src/components/RuntimeLogs/LogsActions.test.tsx
  • plugins/openchoreo-observability/src/components/Alerts/ObservabilityAlertsPage.test.tsx
  • plugins/openchoreo-observability/src/components/Incidents/IncidentsActions.test.tsx
  • plugins/openchoreo-observability/src/components/Incidents/IncidentsFilter.test.tsx
  • plugins/openchoreo-observability/src/components/Alerts/AlertsFilter.test.tsx
  • plugins/openchoreo-observability/src/hooks/useTraces.test.ts
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityRuntimeLogsPage.test.tsx
  • plugins/openchoreo-observability/src/types.ts
  • plugins/openchoreo-observability/src/hooks/useTraces.ts
  • plugins/openchoreo-observability/src/components/Incidents/types.ts
  • plugins/openchoreo-observability/src/components/Incidents/ObservabilityProjectIncidentsPage.test.tsx
🚧 Files skipped from review as they are similar to previous changes (11)
  • plugins/openchoreo-observability/src/components/Alerts/AlertsFilter.tsx
  • plugins/openchoreo-observability/src/components/RuntimeLogs/LogsFilter.test.tsx
  • plugins/openchoreo-observability/src/components/Traces/TracesFilters.tsx
  • plugins/openchoreo-observability/src/components/Alerts/AlertsActions.test.tsx
  • plugins/openchoreo-observability/src/components/Alerts/types.ts
  • plugins/openchoreo-observability/src/hooks/useComponentAlerts.ts
  • plugins/openchoreo-observability/src/components/Incidents/IncidentsFilter.tsx
  • plugins/openchoreo-observability-backend/src/services/ObservabilityService.ts
  • plugins/openchoreo-observability/src/components/RuntimeLogs/ObservabilityProjectRuntimeLogsPage.tsx
  • plugins/openchoreo-observability/src/hooks/useUrlFiltersForIncidents.ts
  • plugins/openchoreo-observability/src/components/Alerts/ObservabilityAlertsPage.tsx

@LakshanSS LakshanSS merged commit 15f2526 into openchoreo:main Apr 7, 2026
7 checks passed
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.

3 participants