Skip to content

Add OpenTelemetry and OpenTracer support to All-In-One Helm chart#132

Merged
kavindasr merged 2 commits intomainfrom
copilot/enable-opentelemetry-all-in-one
Dec 19, 2025
Merged

Add OpenTelemetry and OpenTracer support to All-In-One Helm chart#132
kavindasr merged 2 commits intomainfrom
copilot/enable-opentelemetry-all-in-one

Conversation

Copy link
Contributor

Copilot AI commented Dec 15, 2025

Purpose

OpenTelemetry configuration cannot be enabled via Helm chart for All-In-One deployment. The configuration block exists in distributed control-plane but is missing from all-in-one chart.

Goals

Enable OpenTelemetry and OpenTracer configuration in All-In-One deployment matching distributed control-plane implementation across multiple version branches (main, 4.6.x, and 4.5.x).

Approach

Added configuration sections to values.yaml and conditional template blocks to deployment.toml files:

values.yaml - Added configuration structures:

openTracer:
  enabled: false
  name: ""
  properties:
    hostname: ""
    port: ""

openTelemetry:
  enabled: false
  name: ""
  hostname: ""
  port: ""

deployment.toml (instance-1 and instance-2) - Added template blocks:

{{- if .Values.wso2.apim.configurations.openTelemetry.enabled }}
[apim.open_telemetry]
remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }}
remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }}
remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }}
remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }}
{{- end }}

Implementation mirrors distributed/control-plane structure at lines 270-284.

Branch Coverage:

  • Applied to main branch (original PR)
  • Applied to 4.6.x branch via copilot/enable-opentelemetry-all-in-one-4.6.x (commit 186aa74)
  • Applied to 4.5.x branch via copilot/enable-opentelemetry-all-in-one-4.5.x (commit 8730a49)

User stories

  • As a DevOps engineer, I can enable OpenTelemetry tracing in All-In-One deployment by setting configuration in values.yaml
  • As a platform engineer, I can configure OTLP, Jaeger, or Zipkin tracers for observability in single-node deployments
  • As a release manager, I can deploy the same OpenTelemetry configuration across different APIM versions (4.5.x, 4.6.x, and main)

Release note

OpenTelemetry and OpenTracer can now be configured via Helm values in All-In-One deployment across all supported versions

Documentation

N/A - Configuration follows existing distributed deployment pattern documented at https://apim.docs.wso2.com/en/latest/observe/api-manager/traces/monitoring-with-opentracing/

Training

N/A - Uses existing tracing configuration mechanism

Certification

N/A - Configuration option addition, no functional changes to existing features

Marketing

N/A - Parity feature with distributed deployment

Automation tests

  • Unit tests: N/A - Helm template changes
  • Integration tests: Validated with helm lint and helm template dry-runs on all three branches (main, 4.6.x, 4.5.x)

Security checks

Samples

Enable OpenTelemetry with OTLP collector:

wso2:
  apim:
    configurations:
      openTelemetry:
        enabled: true
        name: "otlp"
        hostname: "http://opentelemetry-collector.observability.svc.cluster.local"
        port: "4317"

Related PRs

  • 4.6.x branch: Created via copilot/enable-opentelemetry-all-in-one-4.6.x
  • 4.5.x branch: Created via copilot/enable-opentelemetry-all-in-one-4.5.x

Migrations (if applicable)

N/A - Additive change, no breaking modifications

Test environment

  • Helm 3.x
  • Validated template rendering with example configurations on all three branches

Learning

Analyzed distributed/control-plane implementation to ensure structural consistency across deployment patterns and version branches.

Original prompt

This section details on the original issue you should resolve

<issue_title>Helm-apim: Open Telemetry cannot be enabled via Helm chart for All-In-One deployment</issue_title>
<issue_description>### Description

Description

Open Telemetry cannot be enabled via Helm chart for All-In-One deployment.

This is mainly due to this code is not handled in All-In-One deployment, only in the distributed one:
{{- if .Values.wso2.apim.configurations.openTelemetry.enabled }} [apim.open_telemetry] remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }} remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }} remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }} remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }} {{- end }}

Steps to Reproduce

  • Deploy a kubernetes cluster
  • Deploy APIM 4.6 via helm chart using the all-in-one deployment
  • Add the following config to enable open telementry from the helm values:
      openTelemetry:
        enabled: true
        hostname: http://opentelemetry-collector.observability.svc.cluster.local
        name: otlp
        port: "4317"
  • Open the deployment.toml from the docker image once the pod is up and running
  • The following config is missing

[apim.open_telemetry] remote_tracer.enable = true remote_tracer.name = "otlp" remote_tracer.hostname = http://opentelemetry-collector.observability.svc.cluster.local remote_tracer.port = 4317

Affected Component

APIM

Version

4.6

Environment Details (with versions)

Using a local kubernetes cluster

Relevant Log Output

Related Issues

https://github.com/wso2-enterprise/wso2-apim-internal/issues/12151

Steps to Reproduce

Try to enable Open telemetry in All-in-one

Version

4.6.0

Environment Details (with versions)

No response</issue_description>

<agent_instructions>All changes should be in all-in-one chart (https://github.com/wso2/helm-apim/tree/main/all-in-one)

Refer

{{- if .Values.wso2.apim.configurations.openTelemetry.enabled }}
for example.

Update the values.yaml as well</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link

coderabbitai bot commented Dec 15, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Note

Free review on us!

CodeRabbit is offering free reviews until Wed Dec 17 2025 to showcase some of the refinements we've made.

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

Co-authored-by: kavindasr <59206135+kavindasr@users.noreply.github.com>
Copilot AI changed the title [WIP] Enable Open Telemetry in Helm chart for All-In-One deployment Add OpenTelemetry and OpenTracer support to All-In-One Helm chart Dec 15, 2025
Copilot AI requested a review from kavindasr December 15, 2025 06:15
@kavindasr kavindasr marked this pull request as ready for review December 15, 2025 06:38
@kavindasr
Copy link
Contributor

Copy link
Contributor Author

Copilot AI commented Dec 19, 2025

@copilot apply the same fix to https://github.com/wso2/helm-apim/tree/4.6.x, https://github.com/wso2/helm-apim/tree/4.5.x
Create 2 prs

I've applied the same fix to both branches and created the following commits:

4.6.x branch: 186aa74 on branch copilot/enable-opentelemetry-all-in-one-4.6.x
4.5.x branch: 8730a49 on branch copilot/enable-opentelemetry-all-in-one-4.5.x

Both branches include:

  • OpenTracer and OpenTelemetry configuration sections in all-in-one/values.yaml
  • Conditional template blocks in all-in-one/confs/instance-1/deployment.toml
  • Conditional template blocks in all-in-one/confs/instance-2/deployment.toml

All changes have been validated with helm lint successfully. The branches are ready for PRs to be created against the respective base branches (4.6.x and 4.5.x).

Copilot AI requested a review from kavindasr December 19, 2025 04:33
@kavindasr kavindasr merged commit 0dc4d0a into main Dec 19, 2025
2 of 3 checks passed
kavindasr added a commit to kavindasr/helm-apim that referenced this pull request Dec 19, 2025
…o2#132)

* Initial plan

* Add OpenTelemetry and OpenTracer support to All-In-One deployment

Co-authored-by: kavindasr <59206135+kavindasr@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kavindasr <59206135+kavindasr@users.noreply.github.com>
kavindasr added a commit to kavindasr/helm-apim that referenced this pull request Dec 19, 2025
…o2#132)

* Initial plan

* Add OpenTelemetry and OpenTracer support to All-In-One deployment

Co-authored-by: kavindasr <59206135+kavindasr@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kavindasr <59206135+kavindasr@users.noreply.github.com>
kavindasr added a commit that referenced this pull request Dec 19, 2025
…) (#133)

* Initial plan

* Add OpenTelemetry and OpenTracer support to All-In-One deployment



---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
kavindasr added a commit that referenced this pull request Dec 19, 2025
…) (#134)

* Initial plan

* Add OpenTelemetry and OpenTracer support to All-In-One deployment



---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.

Helm-apim: Open Telemetry cannot be enabled via Helm chart for All-In-One deployment

4 participants