Skip to content

Commit 23dcd9f

Browse files
authored
Merge pull request #10096 from jdiehl/patch-639002
Added Deployment Instructions for Tracing
2 parents b19a365 + a2cf857 commit 23dcd9f

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

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

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,45 @@ 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 for 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+
### OpenTelemetry Collector on Different Host
71+
72+
If the OpenTelemetry Collector is not running on the same host as your application, you must also specify the trace export endpoint:
73+
74+
```
75+
-Dotel.exporter.otlp.traces.endpoint=http://collector-host:port
76+
```
77+
78+
{{% alert color="info" %}}
79+
Replace `collector-host` and `port` with the host and port of your OpenTelemetry collector.
80+
{{% /alert %}}
81+
82+
### Docker-Based Deployment
83+
84+
For Docker deployments, you can set the JVM parameters using the `JAVA_TOOL_OPTIONS` environment variable. For example:
85+
86+
```
87+
docker run MyMendixApp \
88+
-e JAVA_TOOL_OPTIONS="-javaagent:mxinstallation/runtime/agents/opentelemetry-javaagent.jar \
89+
-Dotel.javaagent.extensions=mxinstallation/runtime/agents/mendix-opentelemetry-agent-extension.jar \
90+
-Dotel.service.name=MyServiceName \
91+
-Dotel.exporter.otlp.traces.endpoint=http://collector-host:port"
92+
```
93+
94+
{{% alert color="info" %}}
95+
Replace `MyServiceName` with a meaningful identifier for your service and `collector-host` and `port` with the host and port of your OpenTelemetry collector.
96+
{{% /alert %}}

0 commit comments

Comments
 (0)