Skip to content

Commit 7a6a943

Browse files
roeleschaer-bgs
authored andcommitted
Add support for OTLP OpenTelemetry and resource attributes
1 parent 7a834d1 commit 7a6a943

11 files changed

Lines changed: 78 additions & 0 deletions

File tree

‎all-in-one/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ A Helm chart for the deployment of WSO2 API Manager all-in-one distribution.
214214
| wso2.apim.configurations.openTelemetry.hostname | string | `""` | Remote tracer hostname |
215215
| wso2.apim.configurations.openTelemetry.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin, OTLP |
216216
| wso2.apim.configurations.openTelemetry.port | string | `""` | Remote tracer port |
217+
| wso2.apim.configurations.openTelemetry.url | string | `""` | Remote tracer URL. This should be used when name is OTLP |
218+
| wso2.apim.configurations.openTelemetry.resourceAttributes | list | `[]` | Open Telemetry resource attributes |
217219
| wso2.apim.configurations.openTracer.enabled | bool | `false` | Open Tracing enabled |
218220
| wso2.apim.configurations.openTracer.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin |
219221
| wso2.apim.configurations.openTracer.properties.hostname | string | `""` | Remote tracer hostname |

‎all-in-one/confs/instance-1/deployment.toml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,19 @@ remote_tracer.properties.port = {{ .Values.wso2.apim.configurations.openTracer.p
333333
[apim.open_telemetry]
334334
remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }}
335335
remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }}
336+
{{- if ne (.Values.wso2.apim.configurations.openTelemetry.url) "" }}
337+
remote_tracer.url = {{ .Values.wso2.apim.configurations.openTelemetry.url | quote }}
338+
{{- else }}
336339
remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }}
337340
remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }}
338341
{{- end }}
342+
{{- end }}
343+
344+
{{- range .Values.wso2.apim.configurations.openTelemetry.resourceAttributes }}
345+
[[apim.open_telemetry.resource_attributes]]
346+
name = {{ .name | quote }}
347+
value = {{ .value | quote }}
348+
{{- end }}
339349

340350
[apim.devportal]
341351
url = "https://{{ .Values.kubernetes.ingress.management.hostname }}/devportal"

‎all-in-one/confs/instance-2/deployment.toml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,19 @@ remote_tracer.properties.port = {{ .Values.wso2.apim.configurations.openTracer.p
333333
[apim.open_telemetry]
334334
remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }}
335335
remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }}
336+
{{- if ne (.Values.wso2.apim.configurations.openTelemetry.url) "" }}
337+
remote_tracer.url = {{ .Values.wso2.apim.configurations.openTelemetry.url | quote }}
338+
{{- else }}
336339
remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }}
337340
remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }}
338341
{{- end }}
342+
{{- end }}
343+
344+
{{- range .Values.wso2.apim.configurations.openTelemetry.resourceAttributes }}
345+
[[apim.open_telemetry.resource_attributes]]
346+
name = {{ .name | quote }}
347+
value = {{ .value | quote }}
348+
{{- end }}
339349

340350
[apim.devportal]
341351
url = "https://{{ .Values.kubernetes.ingress.management.hostname }}/devportal"

‎distributed/control-plane/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ A Helm chart for the deployment of WSO2 API Management API Control Plane profile
148148
| wso2.apim.configurations.openTelemetry.hostname | string | `""` | Remote tracer hostname |
149149
| wso2.apim.configurations.openTelemetry.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin, OTLP |
150150
| wso2.apim.configurations.openTelemetry.port | string | `""` | Remote tracer port |
151+
| wso2.apim.configurations.openTelemetry.url | string | `""` | Remote tracer URL. This should be used when name is OTLP |
152+
| wso2.apim.configurations.openTelemetry.resourceAttributes | list | `[]` | Open Telemetry resource attributes |
151153
| wso2.apim.configurations.openTracer.enabled | bool | `false` | Open Tracing enabled |
152154
| wso2.apim.configurations.openTracer.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin |
153155
| wso2.apim.configurations.openTracer.properties.hostname | string | `""` | Remote tracer hostname |

‎distributed/control-plane/confs/instance-1/deployment.toml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,19 @@ remote_tracer.properties.port = {{ .Values.wso2.apim.configurations.openTracer.p
279279
[apim.open_telemetry]
280280
remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }}
281281
remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }}
282+
{{- if ne (.Values.wso2.apim.configurations.openTelemetry.url) "" }}
283+
remote_tracer.url = {{ .Values.wso2.apim.configurations.openTelemetry.url | quote }}
284+
{{- else }}
282285
remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }}
283286
remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }}
284287
{{- end }}
288+
{{- end }}
289+
290+
{{- range .Values.wso2.apim.configurations.openTelemetry.resourceAttributes }}
291+
[[apim.open_telemetry.resource_attributes]]
292+
name = {{ .name | quote }}
293+
value = {{ .value | quote }}
294+
{{- end }}
285295

286296
[apim.ai]
287297
{{- if .Values.wso2.apim.configurations.ai.enabled }}

‎distributed/control-plane/confs/instance-2/deployment.toml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,19 @@ remote_tracer.properties.port = {{ .Values.wso2.apim.configurations.openTracer.p
279279
[apim.open_telemetry]
280280
remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }}
281281
remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }}
282+
{{- if ne (.Values.wso2.apim.configurations.openTelemetry.url) "" }}
283+
remote_tracer.url = {{ .Values.wso2.apim.configurations.openTelemetry.url | quote }}
284+
{{- else }}
282285
remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }}
283286
remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }}
284287
{{- end }}
288+
{{- end }}
289+
290+
{{- range .Values.wso2.apim.configurations.openTelemetry.resourceAttributes }}
291+
[[apim.open_telemetry.resource_attributes]]
292+
name = {{ .name | quote }}
293+
value = {{ .value | quote }}
294+
{{- end }}
285295

286296
[apim.ai]
287297
{{- if .Values.wso2.apim.configurations.ai.enabled }}

‎distributed/gateway/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ A Helm chart for the deployment of WSO2 API Management Universal Gateway profile
139139
| wso2.apim.configurations.openTelemetry.hostname | string | `""` | Remote tracer hostname |
140140
| wso2.apim.configurations.openTelemetry.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin, OTLP |
141141
| wso2.apim.configurations.openTelemetry.port | string | `""` | Remote tracer port |
142+
| wso2.apim.configurations.openTelemetry.url | string | `""` | Remote tracer URL. This should be used when name is OTLP |
143+
| wso2.apim.configurations.openTelemetry.resourceAttributes | list | `[]` | Open Telemetry resource attributes |
142144
| wso2.apim.configurations.openTracer.enabled | bool | `false` | Open Tracing enabled |
143145
| wso2.apim.configurations.openTracer.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin |
144146
| wso2.apim.configurations.openTracer.properties.hostname | string | `""` | Remote tracer hostname |

‎distributed/gateway/confs/deployment.toml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,19 @@ remote_tracer.properties.port = {{ .Values.wso2.apim.configurations.openTracer.p
262262
[apim.open_telemetry]
263263
remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }}
264264
remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }}
265+
{{- if ne (.Values.wso2.apim.configurations.openTelemetry.url) "" }}
266+
remote_tracer.url = {{ .Values.wso2.apim.configurations.openTelemetry.url | quote }}
267+
{{- else }}
265268
remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }}
266269
remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }}
267270
{{- end }}
271+
{{- end }}
272+
273+
{{- range .Values.wso2.apim.configurations.openTelemetry.resourceAttributes }}
274+
[[apim.open_telemetry.resource_attributes]]
275+
name = {{ .name | quote }}
276+
value = {{ .value | quote }}
277+
{{- end }}
268278

269279
[transport.passthru_https.sender.parameters]
270280
HostnameVerifier = {{ .Values.wso2.apim.configurations.transport.passthru_https.sender.parameters.hostnameVerifier | quote }}

‎distributed/traffic-manager/README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ A Helm chart for the deployment of WSO2 API Management Traffic Manager profile
7474
| wso2.apim.configurations.openTelemetry.hostname | string | `""` | Remote tracer hostname |
7575
| wso2.apim.configurations.openTelemetry.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin, OTLP |
7676
| wso2.apim.configurations.openTelemetry.port | string | `""` | Remote tracer port |
77+
| wso2.apim.configurations.openTelemetry.url | string | `""` | Remote tracer URL. This should be used when name is OTLP |
78+
| wso2.apim.configurations.openTelemetry.resourceAttributes | list | `[]` | Open Telemetry resource attributes |
7779
| wso2.apim.configurations.openTracer.enabled | bool | `false` | Open Tracing enabled |
7880
| wso2.apim.configurations.openTracer.name | string | `""` | Remote tracer name. e.g. jaeger, zipkin |
7981
| wso2.apim.configurations.openTracer.properties.hostname | string | `""` | Remote tracer hostname |

‎distributed/traffic-manager/confs/instance-1/deployment.toml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,19 @@ remote_tracer.properties.port = {{ .Values.wso2.apim.configurations.openTracer.p
163163
[apim.open_telemetry]
164164
remote_tracer.enable = {{ .Values.wso2.apim.configurations.openTelemetry.enabled }}
165165
remote_tracer.name = {{ .Values.wso2.apim.configurations.openTelemetry.name | quote }}
166+
{{- if ne (.Values.wso2.apim.configurations.openTelemetry.url) "" }}
167+
remote_tracer.url = {{ .Values.wso2.apim.configurations.openTelemetry.url | quote }}
168+
{{- else }}
166169
remote_tracer.hostname = {{ .Values.wso2.apim.configurations.openTelemetry.hostname | quote }}
167170
remote_tracer.port = {{ .Values.wso2.apim.configurations.openTelemetry.port | quote }}
168171
{{- end }}
172+
{{- end }}
173+
174+
{{- range .Values.wso2.apim.configurations.openTelemetry.resourceAttributes }}
175+
[[apim.open_telemetry.resource_attributes]]
176+
name = {{ .name | quote }}
177+
value = {{ .value | quote }}
178+
{{- end }}
169179

170180
[transport.https.properties]
171181
proxyPort = 443

0 commit comments

Comments
 (0)