Skip to content

Commit b9b5d7e

Browse files
committed
DES-7315 Documented how to use OTEL in MxOK.
1 parent 6f4a8f4 commit b9b5d7e

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

content/en/docs/refguide/runtime/tracing-in-runtime.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,73 @@ To use the OpenTelemetry Collector with Datadog, follow these steps:
159159
2. Install the `otelcol_contrib` package instead of `otelcol` to include Datadog support.
160160
3. Run the collector with the [appropriate configuration](https://docs.datadoghq.com/opentelemetry/setup/collector_exporter/install/#2---configure-the-datadog-exporter-and-connector) adapted for Datadog.
161161

162+
## Sending Traces from Mendix on Kubernetes
163+
164+
Mendix on Kubernetes can send OpenTelemetry traces to a standards-compliant OpenTelemetry Collector.
165+
166+
Some cloud providers provide OpenTelemetry instrumentation Agents and will not work with the Mendix Runtime.
167+
For example:
168+
169+
* [Azure Application Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-enable) is incompatible with the standard OpenTelemetry instrumentation Agent bundled with the Mendix Runtime.
170+
171+
### Installing Jaeger from a Helm chart
172+
173+
To get an OpenTelemetry collector installed into a Kubernetes cluster, contact your cluster admin.
174+
175+
For quick experiments or non-production use cases, Jaeger can be installed using the [official Helm chart](https://github.com/jaegertracing/helm-charts/tree/jaeger-4.7.0/charts/jaeger).
176+
177+
{{% alert color="warning" %}}
178+
The default Jaeger configuration is not production-grade: it doesn't have any authentication and stores all traces in-memory.
179+
180+
To get a production-grade OpenTelemetry collector installed into a Kubernetes cluster, contact your cluster admin.
181+
{{% /alert %}}
182+
183+
To install Jaeger into a Kubernetes cluster (except OpenShift), run the following commands in a Bash prompt:
184+
185+
```shell
186+
HELM_RELEASE=mx-jaeger
187+
helm repo add jaegertracing https://jaegertracing.github.io/helm-charts
188+
helm install $HELM_RELEASE jaegertracing/jaeger --version='~4.7' \
189+
--set storage.type=memory
190+
```
191+
192+
To install Jaeger into an OpenShift cluster, run the following commands in a Bash prompt:
193+
194+
```shell
195+
HELM_RELEASE=mx-jaeger
196+
helm repo add jaegertracing https://jaegertracing.github.io/helm-charts
197+
helm install $HELM_RELEASE jaegertracing/jaeger --version='~4.7' \
198+
--set storage.type=memory \
199+
--set jaeger.podSecurityContext=null
200+
```
201+
202+
To access the Jaeger web UI, run the following command in a Bash prompt:
203+
204+
```shell
205+
HELM_RELEASE=mx-jaeger
206+
kubectl port-forward svc/${HELM_RELEASE} 16686:16686
207+
```
208+
209+
To send traces to this OpenTelemetry Collector, use the following hostname format (where `${HELM_RELEASE}` is the value of `HELM_RELEASE` used during installation, and `${NAMESPACE}` is the namespace where the Jaeger Helm chart was installed):
210+
211+
```
212+
${HELM_RELEASE}.${NAMESPACE}.svc.cluster.local
213+
```
214+
215+
for example, `mx-jaeger.example-namespace.svc.cluster.local`.
216+
217+
### OpenTelemetry Collector
218+
219+
To send logs and traces from a Mendix on Kubernetes environment to an OpenTelemetry collector, set the _Custom JVM Options_ to :
220+
221+
```
222+
-javaagent:/opt/mendix/runtime/agents/opentelemetry-javaagent.jar -Dotel.javaagent.extensions=/opt/mendix/runtime/agents/mendix-opentelemetry-agent-extension.jar -Dotel.service.name=${APP_NAME} -Dotel.exporter.otlp.traces.endpoint=http://${OTEL_HOSTPORT}:4318/v1/traces -Dotel.exporter.otlp.traces.protocol=http/protobuf
223+
```
224+
225+
Replace `${APP_NAME}` with a meaninful identifier for your environment (service), and `${OTEL_HOST}` with the hostname of the OpenTelemetry Collector.
226+
227+
Depending on how the OpenTelemetry Collector is configured, the values of `-Dotel.exporter.otlp.traces.endpoint` and `-Dotel.exporter.otlp.traces.protocol` might need to be modified.
228+
162229
## Include Metrics and Logs in OpenTelemetry
163230

164231
You can also collect metrics data (CPU load, memory, etc.) and logs using OpenTelemetry.

0 commit comments

Comments
 (0)