Skip to content

Commit d417940

Browse files
authored
Added Deployment Instructions for Tracing
1 parent 50a6046 commit d417940

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

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

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,40 @@ The Java Agent can be configured through system properties, which can be added t
5252
| `otel.exporter.otlp.traces.certificate` | The path to the file containing trusted certificates to use when verifying a trace server's TLS credentials. The file should contain one or more X.509 certificates in PEM format. | By default the host platform's trusted root certificates are used. |
5353
| `otel.exporter.otlp.traces.client.key` | The path to the file containing the private client key to use when verifying a trace client's TLS credentials. The file should contain one private key in PKCS8 PEM format. | By default no client key file is used. |
5454
| `otel.exporter.otlp.traces.client.certificate` | The path to the file containing trusted certificates to use when verifying a trace client's TLS credentials. The file should contain one or more X.509 certificates in PEM format. | By default no certificate file is used. |
55+
56+
## Enabling Tracing for Deployed Applications
57+
58+
To enable tracing in your deployed Mendix application, configure the following JVM parameters:
59+
60+
```
61+
-javaagent:mxinstallation/runtime/agents/opentelemetry-javaagent.jar
62+
-Dotel.javaagent.extensions=mxinstallation/runtime/agents/mendix-opentelemetry-agent-extension.jar
63+
-Dotel.service.name=MyServiceName
64+
```
65+
66+
{{% alert color="info" %}}
67+
Replace MyServiceName with a meaningful identifier for your service.
68+
{{% /alert %}}
69+
70+
71+
If the OpenTelemetry Collector is **not running on the same host** as your application, you must also specify the trace export endpoint:
72+
73+
```
74+
-Dotel.exporter.otlp.traces.endpoint=http://collector-host:port
75+
```
76+
77+
{{% alert color="info" %}}
78+
Replace collector-host and port with the host and port of your OpenTelemetry collector.
79+
{{% /alert %}}
80+
81+
### Docker-Based Deployment
82+
83+
For Docker deployments, you can set the JVM parameters using the `JAVA_TOOL_OPTIONS` environment variable. Example:
84+
85+
```
86+
docker run MyMendixApp \
87+
-e JAVA_TOOL_OPTIONS="-javaagent:mxinstallation/runtime/agents/opentelemetry-javaagent.jar \
88+
-Dotel.javaagent.extensions=mxinstallation/runtime/agents/mendix-opentelemetry-agent-extension.jar \
89+
-Dotel.service.name=MyServiceName \
90+
-Dotel.exporter.otlp.traces.endpoint=http://collector-host:port"
91+
```

0 commit comments

Comments
 (0)