Refactor trace functions and update API documentation#636
Refactor trace functions and update API documentation#636rasika2012 wants to merge 7 commits intowso2:mainfrom
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe pull request removes trace-observability integration from agent-manager-service, moves trace endpoints and JWT-protected tracing responsibilities to traces-observer-service, updates console frontend to call the observer service using component/environment UIDs, and adjusts deployment/Helm/configs accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant Browser as Browser / Console
participant AMS as Agent Manager Service
participant TOS as Traces Observer Service
participant KM as Key Manager (JWKS)
rect rgba(200,150,255,0.5)
Note over Browser,AMS: Old Flow (removed)
Browser->>AMS: GET /api/v1/.../traces (org/proj/agent params)
AMS->>AMS: Validate & translate
AMS->>TOS: GET /api/v1/traces (observer)
TOS-->>AMS: Trace response
AMS-->>Browser: JSON response
end
rect rgba(150,255,150,0.5)
Note over Browser,TOS: New Flow (current)
Browser->>Browser: Resolve componentUid & environmentUid
Browser->>TOS: GET /api/v1/traces?componentUid=...&environmentUid=... (Authorization: Bearer)
TOS->>TOS: JWTAuth middleware extracts token
TOS->>KM: Fetch JWKS (if needed)
KM-->>TOS: JWKS keys
TOS->>TOS: Verify signature, iss, aud
TOS-->>Browser: TraceOverviewResponse
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes
🚥 Pre-merge checks | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 8
🧹 Nitpick comments (2)
traces-observer-service/docs/openapi.yaml (1)
416-421: Consider addingmaxItemsconstraint to span arrays.The
spansarray inTraceDetailsResponselacks a maximum items constraint. Given that traces can contain many spans, consider addingmaxItemsto document the server-side limit and help API consumers handle pagination appropriately.Optional enhancement
spans: type: array + maxItems: 10000 items: $ref: "#/components/schemas/Span"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@traces-observer-service/docs/openapi.yaml` around lines 416 - 421, The TraceDetailsResponse schema's spans array (items: $ref: "#/components/schemas/Span") lacks a maximum size; update the OpenAPI schema for the spans property to include a sensible maxItems value (or a $ref to a reusable constant) and a brief description indicating the server-side limit or that pagination should be used, so consumers know the maximum number of Span objects returned per response and can handle pagination using totalCount.console/workspaces/libs/api-client/src/hooks/traces.ts (1)
92-112: Redundant validation for required typed properties.The
ExportTracesParamstype definescomponentUidandenvironmentUidas requiredstringproperties (lines 93-94). The runtime checks on lines 105-107 are therefore redundant since TypeScript enforces these at compile time. Unless you're defending against JavaScript callers bypassing type checks, consider removing this validation.♻️ Suggested simplification
return useApiMutation({ action: { verb: 'create', target: 'trace export' }, mutationFn: async (params: ExportTracesParams): Promise<TraceExportResponse> => { const { componentUid, environmentUid, startTime, endTime, limit, offset, sortOrder } = params; - - if (!componentUid || !environmentUid) { - throw new Error("Missing required parameters for export"); - } - return exportTraces({ componentUid, environmentUid, startTime, endTime, limit, offset, sortOrder }, getToken); }, });🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@console/workspaces/libs/api-client/src/hooks/traces.ts` around lines 92 - 112, The runtime check in useExportTraces that throws an Error when componentUid or environmentUid are missing is redundant because ExportTracesParams declares those fields as required; remove the conditional block (the if (!componentUid || !environmentUid) { throw new Error(...) }) from the mutationFn in useExportTraces so the function directly calls exportTraces({ componentUid, environmentUid, startTime, endTime, limit, offset, sortOrder }, getToken); if you intend to defend against untyped JS callers instead, replace the throw with a brief runtime-guard comment and keep validation only after explicitly deciding to support that scenario.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@console/workspaces/libs/api-client/src/utils/utils.ts`:
- Around line 121-122: The nullish-coalescing use in the base URL selection
allows empty strings to win; update the logic that sets baseUrl (currently using
globalConfig.obsApiBaseUrl ?? globalConfig.apiBaseUrl) to treat empty or
whitespace-only obsApiBaseUrl as "missing" and fall back to
globalConfig.apiBaseUrl instead; change the condition so it checks that
globalConfig.obsApiBaseUrl is a non-empty trimmed string (reference symbols:
baseUrl, globalConfig.obsApiBaseUrl, globalConfig.apiBaseUrl and the fetch call
that builds `${baseUrl}${context}?...`) and use that result for the fetch.
In `@console/workspaces/pages/traces/src/subComponents/TraceDetails.tsx`:
- Around line 61-74: The trace UI currently calls useTrace before its
prerequisite UIDs are resolved; update the logic so trace fetching is gated on
agentData and environmentsData being settled and valid: ensure useTrace is only
invoked (or enabled) when componentUid (from agentData?.uuid) and environmentUid
(from environmentsData?.find(...)?.id) are non-null, and surface an explicit
loading state while those queries are pending and an explicit empty/error state
when either UID cannot be resolved; reference the hooks/useGetAgent,
useListEnvironments, and useTrace and the variables componentUid,
environmentUid, agentData, environmentsData, traceDetails, and isLoading when
implementing the gating and error/empty UI.
In `@console/workspaces/pages/traces/src/Traces.Component.tsx`:
- Around line 74-77: The code incorrectly treats route param envId as an
environment name and reverse-looks up environmentsData to get an id; instead
resolve the observer UID from the same stable identifier the router persists
(envId). Replace the lookup in Traces.Component.tsx (remove
environmentsData?.find(...) usage and the environmentUid assignment) and simply
set environmentUid = envId (or envId ?? undefined) so the route-provided ID is
used directly; apply the same change to the analogous code in TraceDetails.tsx
and ensure the type matches the expected environment UID type.
In `@traces-observer-service/config/config.go`:
- Around line 68-73: The AuthConfig is being loaded but not validated causing
the service to start with a broken JWT setup; update the config.validate() (or
add a validate() method on AuthConfig) to fail fast: if
Auth.AuthConfig.IsLocalDevEnv is false then require Auth.AuthConfig.JWKSUrl to
be non-empty (and optionally require Issuer/Audience entries), returning an
error when missing so startup aborts; ensure main.go (where the
config.validate() result is checked) propagates this error to stop the process
rather than starting with a bad config.
In `@traces-observer-service/docs/openapi.yaml`:
- Around line 58-59: Update the OpenAPI security requirement entries to use the
object-with-array syntax by replacing the bare "- bearerAuth" with "-
bearerAuth: []" for each trace endpoint; specifically edit the security block
under the /api/v1/trace, /api/v1/traces, and /api/v1/traces/export path
definitions so the security requirement lists bearerAuth with an empty array of
scopes.
In `@traces-observer-service/go.mod`:
- Line 7: The go.mod require line for github.com/golang-jwt/jwt/v5 is
incorrectly marked as indirect; since the jwt v5 package is directly imported in
the codebase (import path github.com/golang-jwt/jwt/v5), edit the go.mod require
statement for that module to remove the trailing "// indirect" so it reads
"require github.com/golang-jwt/jwt/v5 v5.3.1".
In `@traces-observer-service/middleware/auth.go`:
- Around line 119-128: The current JWKS lookup returns an immediate error when
the kid is missing from the cached jwks; change the flow in the code that calls
fetchJWKS and jwkToRSAPublicKey so that on a kid cache miss you attempt one
forced-refresh of the JWKS and retry the lookup before returning an error:
perform the initial fetchJWKS(cfg.JWKSUrl) and search jwks.Keys for kid, and if
not found call fetchJWKS with a force-refresh option (e.g.
fetchJWKS(cfg.JWKSUrl, true) or add a force parameter to fetchJWKS), re-scan the
returned jwks.Keys and only then call jwkToRSAPublicKey(&key) if found or return
fmt.Errorf("no key found for kid: %s", kid) after the retry.
- Around line 214-218: Replace the direct http.Get(jwksURL) call with a
context-aware request using a dedicated http.Client with a bounded timeout (use
10s to match the codebase), have the JWKS-fetching function accept a
context.Context parameter and propagate it into the request (e.g., create req,
use req = req.WithContext(ctx), then client.Do(req)), and validate
resp.StatusCode (expect 2xx) before reading/decoding the body; on non-2xx return
a clear error and still close resp.Body. Ensure callers of the JWKS fetch
function are updated to pass the context through.
---
Nitpick comments:
In `@console/workspaces/libs/api-client/src/hooks/traces.ts`:
- Around line 92-112: The runtime check in useExportTraces that throws an Error
when componentUid or environmentUid are missing is redundant because
ExportTracesParams declares those fields as required; remove the conditional
block (the if (!componentUid || !environmentUid) { throw new Error(...) }) from
the mutationFn in useExportTraces so the function directly calls exportTraces({
componentUid, environmentUid, startTime, endTime, limit, offset, sortOrder },
getToken); if you intend to defend against untyped JS callers instead, replace
the throw with a brief runtime-guard comment and keep validation only after
explicitly deciding to support that scenario.
In `@traces-observer-service/docs/openapi.yaml`:
- Around line 416-421: The TraceDetailsResponse schema's spans array (items:
$ref: "#/components/schemas/Span") lacks a maximum size; update the OpenAPI
schema for the spans property to include a sensible maxItems value (or a $ref to
a reusable constant) and a brief description indicating the server-side limit or
that pagination should be used, so consumers know the maximum number of Span
objects returned per response and can handle pagination using totalCount.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f5094519-fcf8-4ad9-8223-aa38222b5b46
⛔ Files ignored due to path filters (1)
traces-observer-service/go.sumis excluded by!**/*.sum
📒 Files selected for processing (42)
agent-manager-service/.env.exampleagent-manager-service/api/app.goagent-manager-service/api/observability_routes.goagent-manager-service/clients/clientmocks/trace_observer_client_fake.goagent-manager-service/clients/traceobserversvc/client.goagent-manager-service/clients/traceobserversvc/types.goagent-manager-service/clients/traceobserversvc/utils.goagent-manager-service/config/config.goagent-manager-service/config/config_loader.goagent-manager-service/controllers/observability_controller.goagent-manager-service/docs/api_v1_openapi.yamlagent-manager-service/models/traces.goagent-manager-service/services/observability_manager.goagent-manager-service/spec/api_default.goagent-manager-service/spec/client.goagent-manager-service/spec/configuration.goagent-manager-service/tests/get_trace_test.goagent-manager-service/tests/list_traces_test.goagent-manager-service/wiring/params.goagent-manager-service/wiring/wire.goagent-manager-service/wiring/wire_gen.goconsole/apps/webapp/public/config.jsconsole/apps/webapp/public/config.template.jsconsole/workspaces/libs/api-client/src/apis/traces.tsconsole/workspaces/libs/api-client/src/hooks/traces.tsconsole/workspaces/libs/api-client/src/utils/utils.tsconsole/workspaces/libs/types/src/config/index.tsconsole/workspaces/pages/traces/src/Traces.Component.tsxconsole/workspaces/pages/traces/src/subComponents/TraceDetails.tsxdeployments/docker-compose.ymldeployments/helm-charts/wso2-agent-manager/templates/agent-manager-service/configmap.yamldeployments/helm-charts/wso2-agent-manager/templates/console/configmap.yamldeployments/helm-charts/wso2-agent-manager/values.yamldeployments/helm-charts/wso2-amp-observability-extension/templates/deployment.yamldeployments/helm-charts/wso2-amp-observability-extension/values.yamltraces-observer-service/.env.exampletraces-observer-service/config/config.gotraces-observer-service/docs/openapi.yamltraces-observer-service/go.modtraces-observer-service/main.gotraces-observer-service/middleware/auth.gotraces-observer-service/openapi.yaml
💤 Files with no reviewable changes (21)
- agent-manager-service/config/config_loader.go
- agent-manager-service/.env.example
- deployments/docker-compose.yml
- agent-manager-service/api/app.go
- agent-manager-service/tests/get_trace_test.go
- agent-manager-service/config/config.go
- agent-manager-service/clients/traceobserversvc/utils.go
- agent-manager-service/wiring/params.go
- agent-manager-service/api/observability_routes.go
- deployments/helm-charts/wso2-agent-manager/templates/agent-manager-service/configmap.yaml
- agent-manager-service/wiring/wire.go
- traces-observer-service/openapi.yaml
- agent-manager-service/models/traces.go
- agent-manager-service/controllers/observability_controller.go
- agent-manager-service/clients/traceobserversvc/types.go
- agent-manager-service/clients/clientmocks/trace_observer_client_fake.go
- agent-manager-service/docs/api_v1_openapi.yaml
- agent-manager-service/tests/list_traces_test.go
- agent-manager-service/clients/traceobserversvc/client.go
- agent-manager-service/services/observability_manager.go
- agent-manager-service/spec/api_default.go
console/workspaces/pages/traces/src/subComponents/TraceDetails.tsx
Outdated
Show resolved
Hide resolved
…s with JWT authentication middleware for secure access.
…deprecated resolveUids function
- Refactor trace-related components to improve readability and error handling, including updates to API calls and JWT validation. Enhance local development environment configurations and ensure proper handling of prerequisites in trace details and export functionalities.
24d1e4f to
742163c
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (2)
traces-observer-service/config/config.go (1)
133-138: Consider case-insensitive boolean parsing.
getEnvAsBoolonly recognizes"true"and"1"as truthy values. Common environment variable conventions also accept"TRUE","True","yes", etc. Consider usingstrings.EqualFoldfor case-insensitive comparison.Proposed fix
func getEnvAsBool(key string, defaultValue bool) bool { if value := os.Getenv(key); value != "" { - return value == "true" || value == "1" + return strings.EqualFold(value, "true") || value == "1" } return defaultValue }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@traces-observer-service/config/config.go` around lines 133 - 138, getEnvAsBool currently only treats "true" and "1" as truthy and is case-sensitive; update getEnvAsBool to perform case-insensitive comparisons (e.g., use strings.EqualFold or strings.ToLower) and extend accepted truthy values to common variants like "true", "1", "yes", "y", "on" so values like "TRUE" or "Yes" are recognized; modify the logic in getEnvAsBool to normalize the env value and compare against the accepted set before falling back to defaultValue.traces-observer-service/docs/openapi.yaml (1)
455-460: Consider addingmaxItemsconstraint to trace arrays.The
TraceListResponse.tracesarray (and similarlyTraceExportResponse.tracesat lines 518-521) lacks amaxItemsconstraint. WhileTraceDetailsResponse.spanscorrectly specifiesmaxItems: 1000, adding similar bounds to these arrays improves API contract clarity and helps clients allocate resources appropriately.Proposed fix
traces: type: array + maxItems: 1000 items: $ref: "#/components/schemas/Trace"Apply similar constraint to
TraceExportResponse.traces.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@traces-observer-service/docs/openapi.yaml` around lines 455 - 460, Add a maxItems constraint to the TraceListResponse.traces (and the TraceExportResponse.traces) array schema to match the bound used for spans; update the OpenAPI component where TraceListResponse.traces is defined to include maxItems: 1000 (or the same numeric limit used by TraceDetailsResponse.spans) so clients know the upper bound and can allocate resources accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@traces-observer-service/config/config.go`:
- Around line 133-138: getEnvAsBool currently only treats "true" and "1" as
truthy and is case-sensitive; update getEnvAsBool to perform case-insensitive
comparisons (e.g., use strings.EqualFold or strings.ToLower) and extend accepted
truthy values to common variants like "true", "1", "yes", "y", "on" so values
like "TRUE" or "Yes" are recognized; modify the logic in getEnvAsBool to
normalize the env value and compare against the accepted set before falling back
to defaultValue.
In `@traces-observer-service/docs/openapi.yaml`:
- Around line 455-460: Add a maxItems constraint to the TraceListResponse.traces
(and the TraceExportResponse.traces) array schema to match the bound used for
spans; update the OpenAPI component where TraceListResponse.traces is defined to
include maxItems: 1000 (or the same numeric limit used by
TraceDetailsResponse.spans) so clients know the upper bound and can allocate
resources accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a1f8b203-8951-46f0-88f2-49754d59538c
⛔ Files ignored due to path filters (2)
console/common/config/rush/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamltraces-observer-service/go.sumis excluded by!**/*.sum
📒 Files selected for processing (10)
console/workspaces/libs/api-client/src/hooks/traces.tsconsole/workspaces/libs/api-client/src/utils/utils.tsconsole/workspaces/pages/traces/src/Traces.Component.tsxconsole/workspaces/pages/traces/src/subComponents/TraceDetails.tsxdeployments/scripts/setup-openchoreo.shtraces-observer-service/config/config.gotraces-observer-service/config/config_test.gotraces-observer-service/docs/openapi.yamltraces-observer-service/go.modtraces-observer-service/middleware/auth.go
🚧 Files skipped from review as they are similar to previous changes (4)
- traces-observer-service/go.mod
- console/workspaces/pages/traces/src/subComponents/TraceDetails.tsx
- console/workspaces/libs/api-client/src/utils/utils.ts
- traces-observer-service/middleware/auth.go
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
traces-observer-service/docs/openapi.yaml (1)
455-460: Consider addingmaxItemsto array schemas for consistency.Static analysis flagged that
tracesarray inTraceListResponselacks amaxItemsconstraint. WhileTraceDetailsResponse.spanshasmaxItems: 1000, other response arrays don't. This is a minor documentation hygiene issue that doesn't affect functionality.💡 Optional fix
TraceListResponse: type: object required: - traces - totalCount properties: traces: type: array + maxItems: 1000 items: $ref: "#/components/schemas/Trace"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@traces-observer-service/docs/openapi.yaml` around lines 455 - 460, The TraceListResponse schema's traces array is missing a maxItems constraint; add a maxItems entry (e.g. maxItems: 1000 to match TraceDetailsResponse.spans) under the traces property in the TraceListResponse schema so it reads traces: type: array, items: $ref: "#/components/schemas/Trace", maxItems: 1000; ensure you update the TraceListResponse definition referencing traces (and keep consistency with TraceDetailsResponse.spans).deployments/helm-charts/wso2-amp-observability-extension/templates/deployment.yaml (1)
44-52: Consider adding liveness/readiness probes targeting the unauthenticated/healthendpoint.The JWT auth environment variables are correctly configured. However, the Deployment lacks liveness and readiness probes. If probes are added later and mistakenly target
/api/v1/*paths, they will fail with 401 Unauthorized since those paths require JWT authentication. The/healthendpoint (line 94 ofmain.go) is unauthenticated and suitable for probes.💡 Example probe configuration
- name: KEY_MANAGER_AUDIENCE value: "{{ .Values.tracesObserver.auth.audience }}" resources: limits: memory: {{ .Values.tracesObserver.resourceLimits.memory }} cpu: {{ .Values.tracesObserver.resourceLimits.cpu }} requests: memory: {{ .Values.tracesObserver.resourceRequests.memory }} cpu: {{ .Values.tracesObserver.resourceRequests.cpu }} + livenessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 10 + periodSeconds: 15 + readinessProbe: + httpGet: + path: /health + port: http + initialDelaySeconds: 5 + periodSeconds: 10🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@deployments/helm-charts/wso2-amp-observability-extension/templates/deployment.yaml` around lines 44 - 52, Add Kubernetes liveness/readiness probes to the Deployment's container spec so they call the unauthenticated /health endpoint (implemented in main.go at the /health handler) instead of any /api/v1/* paths that require JWT; update the templates/deployment.yaml near the JWT env vars (IS_LOCAL_DEV_ENV, KEY_MANAGER_JWKS_URL, KEY_MANAGER_ISSUER, KEY_MANAGER_AUDIENCE) to include an httpGet probe for /health on the container port, with sensible initialDelaySeconds/periodSeconds and failureThreshold for both liveness and readiness so probes never hit auth-protected endpoints.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@agent-manager-service/wiring/wire_gen.go`:
- Line 24: Regenerate the Wire output so the provider sets in wire_gen.go match
wire.go: run the Wire code generator (e.g., `wire`) from the package that
contains wire.go to update wire_gen.go, ensuring the missing providers
ProvideGitCredentialsService, services.NewGitSecretService, and
controllers.NewGitSecretController are included in the generated provider sets;
then commit the updated wire_gen.go so codegenfmt-check passes.
---
Nitpick comments:
In
`@deployments/helm-charts/wso2-amp-observability-extension/templates/deployment.yaml`:
- Around line 44-52: Add Kubernetes liveness/readiness probes to the
Deployment's container spec so they call the unauthenticated /health endpoint
(implemented in main.go at the /health handler) instead of any /api/v1/* paths
that require JWT; update the templates/deployment.yaml near the JWT env vars
(IS_LOCAL_DEV_ENV, KEY_MANAGER_JWKS_URL, KEY_MANAGER_ISSUER,
KEY_MANAGER_AUDIENCE) to include an httpGet probe for /health on the container
port, with sensible initialDelaySeconds/periodSeconds and failureThreshold for
both liveness and readiness so probes never hit auth-protected endpoints.
In `@traces-observer-service/docs/openapi.yaml`:
- Around line 455-460: The TraceListResponse schema's traces array is missing a
maxItems constraint; add a maxItems entry (e.g. maxItems: 1000 to match
TraceDetailsResponse.spans) under the traces property in the TraceListResponse
schema so it reads traces: type: array, items: $ref:
"#/components/schemas/Trace", maxItems: 1000; ensure you update the
TraceListResponse definition referencing traces (and keep consistency with
TraceDetailsResponse.spans).
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7b3f32aa-e23e-41c6-9089-c7d20a8fb1a1
⛔ Files ignored due to path filters (2)
console/common/config/rush/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamltraces-observer-service/go.sumis excluded by!**/*.sum
📒 Files selected for processing (43)
agent-manager-service/.env.exampleagent-manager-service/api/app.goagent-manager-service/clients/clientmocks/trace_observer_client_fake.goagent-manager-service/clients/traceobserversvc/client.goagent-manager-service/clients/traceobserversvc/types.goagent-manager-service/clients/traceobserversvc/utils.goagent-manager-service/config/config.goagent-manager-service/config/config_loader.goagent-manager-service/controllers/observability_controller.goagent-manager-service/docs/api_v1_openapi.yamlagent-manager-service/models/traces.goagent-manager-service/services/observability_manager.goagent-manager-service/spec/api_default.goagent-manager-service/spec/client.goagent-manager-service/spec/configuration.goagent-manager-service/tests/get_trace_test.goagent-manager-service/tests/list_traces_test.goagent-manager-service/wiring/params.goagent-manager-service/wiring/wire.goagent-manager-service/wiring/wire_gen.goconsole/apps/webapp/public/config.jsconsole/apps/webapp/public/config.template.jsconsole/workspaces/libs/api-client/src/apis/traces.tsconsole/workspaces/libs/api-client/src/hooks/traces.tsconsole/workspaces/libs/api-client/src/utils/utils.tsconsole/workspaces/libs/types/src/config/index.tsconsole/workspaces/pages/traces/src/Traces.Component.tsxconsole/workspaces/pages/traces/src/subComponents/TraceDetails.tsxdeployments/docker-compose.ymldeployments/helm-charts/wso2-agent-manager/templates/agent-manager-service/configmap.yamldeployments/helm-charts/wso2-agent-manager/templates/console/configmap.yamldeployments/helm-charts/wso2-agent-manager/values.yamldeployments/helm-charts/wso2-amp-observability-extension/templates/deployment.yamldeployments/helm-charts/wso2-amp-observability-extension/values.yamldeployments/scripts/setup-openchoreo.shtraces-observer-service/.env.exampletraces-observer-service/config/config.gotraces-observer-service/config/config_test.gotraces-observer-service/docs/openapi.yamltraces-observer-service/go.modtraces-observer-service/main.gotraces-observer-service/middleware/auth.gotraces-observer-service/openapi.yaml
💤 Files with no reviewable changes (20)
- agent-manager-service/config/config_loader.go
- agent-manager-service/api/app.go
- agent-manager-service/.env.example
- agent-manager-service/clients/traceobserversvc/utils.go
- deployments/docker-compose.yml
- deployments/helm-charts/wso2-agent-manager/templates/agent-manager-service/configmap.yaml
- agent-manager-service/wiring/wire.go
- agent-manager-service/clients/clientmocks/trace_observer_client_fake.go
- agent-manager-service/config/config.go
- agent-manager-service/tests/get_trace_test.go
- agent-manager-service/controllers/observability_controller.go
- agent-manager-service/clients/traceobserversvc/types.go
- traces-observer-service/openapi.yaml
- agent-manager-service/models/traces.go
- agent-manager-service/wiring/params.go
- agent-manager-service/tests/list_traces_test.go
- agent-manager-service/services/observability_manager.go
- agent-manager-service/docs/api_v1_openapi.yaml
- agent-manager-service/clients/traceobserversvc/client.go
- agent-manager-service/spec/api_default.go
✅ Files skipped from review due to trivial changes (8)
- agent-manager-service/spec/configuration.go
- console/apps/webapp/public/config.js
- console/apps/webapp/public/config.template.js
- traces-observer-service/go.mod
- traces-observer-service/.env.example
- deployments/helm-charts/wso2-amp-observability-extension/values.yaml
- console/workspaces/libs/types/src/config/index.ts
- agent-manager-service/spec/client.go
🚧 Files skipped from review as they are similar to previous changes (6)
- deployments/helm-charts/wso2-agent-manager/values.yaml
- console/workspaces/libs/api-client/src/utils/utils.ts
- deployments/helm-charts/wso2-agent-manager/templates/console/configmap.yaml
- console/workspaces/pages/traces/src/Traces.Component.tsx
- console/workspaces/libs/api-client/src/hooks/traces.ts
- traces-observer-service/middleware/auth.go
56dc76c to
b142aba
Compare
b142aba to
dd8a281
Compare
Purpose
Related to: #398
This pull request removes all code related to the Trace Observer service from the
agent-manager-servicecodebase. This includes deleting the client implementation, types, utility functions, route registration, mocks, and configuration for the Trace Observer service. The changes simplify the codebase by eliminating unused or deprecated distributed tracing functionality.Key removals by theme:
Trace Observer Service Client and Types:
traceobserversvcclient implementation, including API calls, type definitions, and utility functions fromagent-manager-service/clients/traceobserversvc/client.go,types.go, andutils.go. [1] [2] [3]Mocks and Testing:
agent-manager-service/clients/clientmocks/trace_observer_client_fake.go.API Routing:
registerObservabilityRoutesand its usages. [1] [2]Configuration:
.env.example. [1] [2] [3] [4]Goals
Approach
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning
Summary by CodeRabbit
Architecture Changes
Security Enhancements
Configuration Updates