Skip to content

feat: rename aws tracing module#118

Merged
chalindukodikara merged 1 commit into
openchoreo:mainfrom
chalindukodikara:issue-3300_rename_aws_tracing_module
May 18, 2026
Merged

feat: rename aws tracing module#118
chalindukodikara merged 1 commit into
openchoreo:mainfrom
chalindukodikara:issue-3300_rename_aws_tracing_module

Conversation

@chalindukodikara
Copy link
Copy Markdown
Contributor

@chalindukodikara chalindukodikara commented May 18, 2026

Purpose

$subject

Approach

Summarize the solution and implementation details.

Related Issues

openchoreo/openchoreo#3300

Checklist

  • Tests added or updated (unit, integration, etc.)
  • Samples updated (if applicable)

Remarks

Add any additional context, known issues, or TODOs related to this PR.

Summary by CodeRabbit

  • Documentation

    • Updated installation and configuration documentation with new Helm chart references and deployment instructions
    • Refreshed troubleshooting guidance with updated diagnostic commands
  • Configuration Updates

    • Updated Helm chart metadata and deployment templates
    • Modified service account names, credential references, and environment configuration values
    • Updated container image repository references

Review Change Stack

Signed-off-by: Chalindu Kodikara <chalindumkodikara@gmail.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 18, 2026

📝 Walkthrough

Walkthrough

The PR rebrands the observability-tracing module from CloudWatch to AWS X-Ray. It systematically updates the Go module path, Helm chart metadata, Kubernetes resource templates, application code imports, and documentation to consistently reference AWS X-Ray instead of CloudWatch across all configuration and deployment artifacts.

Changes

AWS X-Ray Observability Module Rebranding

Layer / File(s) Summary
Module identity and build artifacts
observability-tracing-aws-xray/go.mod, observability-tracing-aws-xray/helm/Chart.yaml, observability-tracing-aws-xray/module.yaml
Go module path, Helm chart name/description/keywords, and module manifest image reference updated to identify the AWS X-Ray module.
Helm template helpers and validation
observability-tracing-aws-xray/helm/templates/_helpers.tpl
Template helpers tracing-cloudwatch.region and tracing-cloudwatch.validate renamed to tracing-aws-xray.region and tracing-aws-xray.validate for downstream template consumption.
Adapter deployment and service resources
observability-tracing-aws-xray/helm/templates/adapter/deployment.yaml, observability-tracing-aws-xray/helm/templates/adapter/service.yaml, observability-tracing-aws-xray/helm/templates/adapter/serviceaccount.yaml
Kubernetes Deployment, Service, and ServiceAccount for the tracing adapter updated to use tracing-adapter-aws-xray naming and AWS X-Ray validation helpers.
AWS credentials and collector environment configuration
observability-tracing-aws-xray/helm/templates/aws-credentials/secret.yaml, observability-tracing-aws-xray/helm/templates/collector-env/configmap.yaml, observability-tracing-aws-xray/helm/templates/opentelemetry-collector/configMap.yaml
AWS credentials Secret and new collector environment ConfigMap templates configured for AWS X-Ray with region validation and environment variable wiring.
Helm values wiring
observability-tracing-aws-xray/helm/values.yaml
Chart values updated to reference tracing-aws-xray-aws-credentials secret, tracing-aws-xray-collector-env configMap, and AWS X-Ray adapter container image in extraEnvsFrom configuration.
Application code imports
observability-tracing-aws-xray/internal/handlers.go, observability-tracing-aws-xray/internal/handlers_test.go, observability-tracing-aws-xray/internal/server.go, observability-tracing-aws-xray/main.go
Go application code updated to import AWS X-Ray module packages (gen and xray) instead of CloudWatch equivalents across all application entry points and handlers.
Installation and operational documentation
observability-tracing-aws-xray/README.md
README updated with AWS X-Ray installation procedures across single-cluster and multi-cluster EKS topologies, Pod Identity configuration, static-credential setup, and troubleshooting; all adapter and credential references changed from CloudWatch to AWS X-Ray naming conventions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • yashodgayashan
  • nilushancosta
  • LakshanSS

Poem

🐰 From CloudWatch logs to X-Ray's glow,
A module transforms with a systematic flow,
Templates renamed, credentials aligned,
AWS X-Ray tracing, beautifully refined! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete. It contains only placeholder text with the Purpose section showing '$subject' instead of actual content, and other required sections (Approach, Related Issues, Remarks) are empty placeholders. Replace placeholder text with actual details: describe the module renaming purpose, explain the implementation approach (file-by-file changes), reference related issues, and provide any additional context or known issues.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: rename aws tracing module' clearly and concisely describes the main change: renaming the AWS tracing module from CloudWatch to AWS X-Ray across all related files and configurations.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

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

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (2.12.2)

level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies"


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.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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: 2

🧹 Nitpick comments (2)
observability-tracing-aws-xray/helm/values.yaml (1)

21-21: 💤 Low value

Consider DRY principle: Secret name duplicated.

The secret name tracing-aws-xray-aws-credentials appears in both awsCredentials.name (line 21) and opentelemetry-collector.extraEnvsFrom[1].secretRef.name (line 58). If a user customizes awsCredentials.name, they must remember to also update the extraEnvsFrom reference, creating a maintenance burden.

Since Helm values files cannot use templating, this duplication is unavoidable in the values file itself. However, consider addressing this in the templates (e.g., _helpers.tpl could provide a helper function that returns the credentials secret name) or document this coupling clearly in comments.

Also applies to: 58-58

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@observability-tracing-aws-xray/helm/values.yaml` at line 21, The values file
duplicates the secret name between awsCredentials.name and
opentelemetry-collector.extraEnvsFrom[1].secretRef.name; update templates to
remove this coupling by introducing a helper in _helpers.tpl (e.g., tpl name
like tracing.awsCredentialsSecretName) and use that helper wherever the secret
is referenced (templates that render awsCredentials and
opentelemetry-collector.extraEnvsFrom) so users only change awsCredentials.name
in values.yaml and all template references stay consistent; alternatively add a
clear commented note in values.yaml linking awsCredentials.name to
opentelemetry-collector.extraEnvsFrom[1].secretRef.name if you prefer
documentation only.
observability-tracing-aws-xray/README.md (1)

463-467: ⚡ Quick win

Simplify static credentials install commands.

The install commands explicitly set awsCredentials.name and opentelemetry-collector.extraEnvsFrom values that already match the chart defaults (from values.yaml lines 21, 56, 58). These --set flags are redundant unless users need to customize the secret name.

Consider simplifying the documented commands to omit these redundant flags, or add a note explaining they're shown for explicitness but can be omitted. For example, the single-cluster static install could be reduced to:

helm upgrade --install observability-tracing-aws-xray \
  oci://ghcr.io/openchoreo/helm-charts/observability-tracing-aws-xray \
  --create-namespace \
  --namespace "$NS" \
  --version 0.2.0 \
  --set region="$AWS_REGION" \
  --set awsCredentials.create=true \
  --set awsCredentials.accessKeyId="$AWS_ACCESS_KEY_ID" \
  --set awsCredentials.secretAccessKey="$AWS_SECRET_ACCESS_KEY"

The awsCredentials.name and extraEnvsFrom will use their defaults automatically.

Also applies to: 503-504

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@observability-tracing-aws-xray/README.md` around lines 463 - 467, The
documented helm install command passes redundant --set flags for
awsCredentials.name and opentelemetry-collector.extraEnvsFrom which match the
chart defaults; remove those redundant flags from the example (leave --set
region, --set awsCredentials.create=true, --set awsCredentials.accessKeyId and
--set awsCredentials.secretAccessKey) or add a short note that
awsCredentials.name and opentelemetry-collector.extraEnvsFrom are shown only for
explicitness and can be omitted because they default to the values.yaml
settings; update the same simplification for the other occurrence mentioned
(lines 503-504 equivalent).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@observability-tracing-aws-xray/helm/templates/_helpers.tpl`:
- Around line 10-12: The validate template "tracing-aws-xray.validate" uses
include truthiness to check region which can miss empty/invalid values because
include returns a string; replace that check with Helm's required function to
enforce a mandatory region (e.g. call required with a descriptive message and
the value obtained from include "tracing-aws-xray.region" or directly from
.Values.region) so the template fails reliably when region is not provided.

In `@observability-tracing-aws-xray/README.md`:
- Line 573: The README table entry for opentelemetry-collector.extraEnvsFrom is
incorrect: update its default value to match values.yaml by including both the
configMapRef and the secretRef (configMapRef: name
tracing-aws-xray-collector-env and secretRef: name
tracing-aws-xray-aws-credentials, optional: true) so the documentation shows the
actual defaults used by the chart.

---

Nitpick comments:
In `@observability-tracing-aws-xray/helm/values.yaml`:
- Line 21: The values file duplicates the secret name between
awsCredentials.name and opentelemetry-collector.extraEnvsFrom[1].secretRef.name;
update templates to remove this coupling by introducing a helper in _helpers.tpl
(e.g., tpl name like tracing.awsCredentialsSecretName) and use that helper
wherever the secret is referenced (templates that render awsCredentials and
opentelemetry-collector.extraEnvsFrom) so users only change awsCredentials.name
in values.yaml and all template references stay consistent; alternatively add a
clear commented note in values.yaml linking awsCredentials.name to
opentelemetry-collector.extraEnvsFrom[1].secretRef.name if you prefer
documentation only.

In `@observability-tracing-aws-xray/README.md`:
- Around line 463-467: The documented helm install command passes redundant
--set flags for awsCredentials.name and opentelemetry-collector.extraEnvsFrom
which match the chart defaults; remove those redundant flags from the example
(leave --set region, --set awsCredentials.create=true, --set
awsCredentials.accessKeyId and --set awsCredentials.secretAccessKey) or add a
short note that awsCredentials.name and opentelemetry-collector.extraEnvsFrom
are shown only for explicitness and can be omitted because they default to the
values.yaml settings; update the same simplification for the other occurrence
mentioned (lines 503-504 equivalent).
🪄 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: e30607f4-25a5-4d4b-98a6-c93a32304246

📥 Commits

Reviewing files that changed from the base of the PR and between 5707c2b and bcbaff0.

⛔ Files ignored due to path filters (4)
  • observability-tracing-aws-xray/go.sum is excluded by !**/*.sum
  • observability-tracing-aws-xray/helm/Chart.lock is excluded by !**/*.lock
  • observability-tracing-aws-xray/internal/api/gen/models.gen.go is excluded by !**/gen/**
  • observability-tracing-aws-xray/internal/api/gen/server.gen.go is excluded by !**/gen/**
📒 Files selected for processing (29)
  • observability-tracing-aws-xray/.dockerignore
  • observability-tracing-aws-xray/Dockerfile
  • observability-tracing-aws-xray/Makefile
  • observability-tracing-aws-xray/README.md
  • observability-tracing-aws-xray/go.mod
  • observability-tracing-aws-xray/helm/.helmignore
  • observability-tracing-aws-xray/helm/Chart.yaml
  • observability-tracing-aws-xray/helm/templates/_helpers.tpl
  • observability-tracing-aws-xray/helm/templates/adapter/deployment.yaml
  • observability-tracing-aws-xray/helm/templates/adapter/service.yaml
  • observability-tracing-aws-xray/helm/templates/adapter/serviceaccount.yaml
  • observability-tracing-aws-xray/helm/templates/aws-credentials/secret.yaml
  • observability-tracing-aws-xray/helm/templates/collector-env/configmap.yaml
  • observability-tracing-aws-xray/helm/templates/opentelemetry-collector/configMap.yaml
  • observability-tracing-aws-xray/helm/values.yaml
  • observability-tracing-aws-xray/internal/api/cfg-models.yaml
  • observability-tracing-aws-xray/internal/api/cfg-server.yaml
  • observability-tracing-aws-xray/internal/config.go
  • observability-tracing-aws-xray/internal/config_test.go
  • observability-tracing-aws-xray/internal/handlers.go
  • observability-tracing-aws-xray/internal/handlers_test.go
  • observability-tracing-aws-xray/internal/server.go
  • observability-tracing-aws-xray/internal/xray/client.go
  • observability-tracing-aws-xray/internal/xray/client_test.go
  • observability-tracing-aws-xray/internal/xray/queries.go
  • observability-tracing-aws-xray/internal/xray/queries_test.go
  • observability-tracing-aws-xray/main.go
  • observability-tracing-aws-xray/module.yaml
  • observability-tracing-cloudwatch/helm/templates/collector-env/configmap.yaml
💤 Files with no reviewable changes (1)
  • observability-tracing-cloudwatch/helm/templates/collector-env/configmap.yaml

Comment on lines +10 to 12
{{- define "tracing-aws-xray.validate" -}}
{{- if not (include "tracing-aws-xray.region" .) -}}
{{- fail "region is required. Example: --set region=us-east-1" -}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use required for region validation instead of include truthiness.

Line 11 can miss invalid input because include returns a string; missing values may not evaluate as empty here, so the fail path can be skipped.

Proposed fix
 {{- define "tracing-aws-xray.region" -}}
-{{- .Values.region -}}
+{{- required "region is required. Example: --set region=us-east-1" .Values.region -}}
 {{- end -}}
 
 {{- define "tracing-aws-xray.validate" -}}
-{{- if not (include "tracing-aws-xray.region" .) -}}
-{{- fail "region is required. Example: --set region=us-east-1" -}}
-{{- end -}}
+{{- include "tracing-aws-xray.region" . -}}
 {{- end -}}
In Helm templates, what does `include` return when a referenced value like `.Values.region` is unset, and is `required` the recommended way to enforce mandatory values?
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@observability-tracing-aws-xray/helm/templates/_helpers.tpl` around lines 10 -
12, The validate template "tracing-aws-xray.validate" uses include truthiness to
check region which can miss empty/invalid values because include returns a
string; replace that check with Helm's required function to enforce a mandatory
region (e.g. call required with a descriptive message and the value obtained
from include "tracing-aws-xray.region" or directly from .Values.region) so the
template fails reliably when region is not provided.

| `opentelemetry-collector.image.tag` | `0.151.0` | Collector image tag. |
| `opentelemetry-collector.serviceAccount.annotations` | `{}` | ServiceAccount annotations for IRSA or other identity integrations. |
| `opentelemetry-collector.extraEnvsFrom` | `[{configMapRef: {name: tracing-cloudwatch-collector-env}}]` | Extra `envFrom` entries for the collector. The default ConfigMap supplies `AWS_REGION`. Append the static AWS credentials Secret at index `1` on non-EKS clusters. |
| `opentelemetry-collector.extraEnvsFrom` | `[{configMapRef: {name: tracing-aws-xray-collector-env}}]` | Extra `envFrom` entries for the collector. The default ConfigMap supplies `AWS_REGION`. Append the static AWS credentials Secret at index `1` on non-EKS clusters. |
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Correct the extraEnvsFrom default value in configuration reference.

The configuration reference states the default is [{configMapRef: {name: tracing-aws-xray-collector-env}}], but the actual default in values.yaml (lines 54-59) includes both a configMapRef AND a secretRef entry:

extraEnvsFrom:
  - configMapRef:
      name: tracing-aws-xray-collector-env
  - secretRef:
      name: tracing-aws-xray-aws-credentials
      optional: true

Update the table entry to reflect the complete default value.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@observability-tracing-aws-xray/README.md` at line 573, The README table entry
for opentelemetry-collector.extraEnvsFrom is incorrect: update its default value
to match values.yaml by including both the configMapRef and the secretRef
(configMapRef: name tracing-aws-xray-collector-env and secretRef: name
tracing-aws-xray-aws-credentials, optional: true) so the documentation shows the
actual defaults used by the chart.

@chalindukodikara chalindukodikara merged commit 04d6502 into openchoreo:main May 18, 2026
5 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