Skip to content

Commit 7fb2fac

Browse files
authored
Merge pull request mendix#8939 from lvanengelen/run/4452-update-tracing-beta-docs
Update tracing documentation to use the Java agent
2 parents 3f78f81 + cf1eeeb commit 7fb2fac

1 file changed

Lines changed: 30 additions & 9 deletions

File tree

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

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,54 @@ In Mendix 10.18.0 and above, the runtime generates spans for:
2525

2626
## Configuration
2727

28-
### Minimal configuration
28+
Since Mendix 10.19.0,
2929

30-
The minimal configuration to enable tracing is:
30+
### Minimal Configuration {#min-configuration}
31+
32+
#### Mendix 10.19.0 and Above
33+
34+
In Mendix 10.19 and above, tracing configuration is handled through the [OpenTelemetry Java Agent](https://opentelemetry.io/docs/zero-code/java/agent/). Use the following steps to set up a minimal tracing configuration:
35+
36+
1. Download [opentelemetry-javaagent.jar](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar) from the [OpenTelemetry Java Instrumentation release page](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases) and save it to a location where your Mendix app can access it.
37+
1. In the [Server settings](/refguide/configuration/#server) of Studio Pro, locate the field **Extra JVM parameters** and add the following:
38+
39+
```
40+
-javaagent:{/path/to/opentelemetry-javaagent.jar} -Dotel.instrumentation.common.default-enabled=false -Dotel.instrumentation.opentelemetry-api.enabled=true -Dotel.service.name="{My App}"
41+
```
42+
43+
1. Change `{/path/to/opentelemetry-javaagent.jar}` to the location where you stored the agent earlier and `{My App}` to the name under which you want your traces to appear.
44+
45+
This will enable Mendix related tracing, while silencing the tracing of internals. The traces will be sent to http://localhost:4317.
46+
47+
#### Mendix 10.18
48+
49+
In Mendix 10.18, the minimal configuration to enable tracing is:
3150
3251
* Set the `OpenTelemetry.Enabled` [runtime setting](/refguide/custom-settings/) to `true`
3352
* Set the `otel.service.name` runtime setting to a service name
3453
3554
This will enable tracing. The traces will be sent to http://localhost:4317.
3655
37-
To test you can use [Jaeger](https://www.jaegertracing.io/), for example the all-in-one binary or docker image. Jaeger will listen to the above endpoint by default.
56+
### Testing
57+
58+
To test the tracing you can use [Jaeger](https://www.jaegertracing.io/). For example, the all-in-one binary or docker image. Jaeger will listen to the above endpoint by default.
3859
3960
Alternatively you can set up the [OpenTelemetry collector](https://opentelemetry.io/docs/collector/), which will also listen to the default endpoint and can be configured to send to backends which support OpenTelemetry. Check with your APM vendor to confirm that OpenTelemetry is supported. The free online collector configuration tool [OTelBin](https://github.com/dash0hq/otelbin) can help with collector configuration.
4061
4162
### All settings
4263
43-
Below we list the supported tracing-related runtime settings. See [Configure the SDK](https://opentelemetry.io/docs/languages/java/configuration/#environment-variables-and-system-properties) for a reference on the settings that are prefixed with `otel.`.
64+
Below we list the ones that are supported by the Mendix runtime. See [Configure the SDK](https://opentelemetry.io/docs/languages/java/configuration/#environment-variables-and-system-properties) for a reference on the settings that are prefixed with `otel.`.
65+
66+
In Mendix 10.19.0 and above, the Java Agent can be configured through system properties, which can be added to the **Extra JVM parameters** field (for example, `-Dotel.exporter.otlp.traces.endpoint`), or set through environment variables.
4467
4568
| Name | Description | Default |
4669
|------|-------------|---------|
47-
| `OpenTelemetry.Enabled` | Can be set to `true` or `false` in order to disable or enable tracing.<br/> {{% alert color="info" %}} We support dynamically enabling/disabling tracing using this setting, but the other settings will only be applied the first time you enable tracing.{{% /alert %}} | `false` |
48-
| `otel.service.name` | The name of the service. | `unknown_service:java` |
49-
| `otel.resource.attributes` | The resource attributes to include in every span. Example: `attribute1=value1,attribute2=value2` | |
70+
| `otel.service.name` | The name of the service. | `runtimelauncher` *(In Mendix 10.18 `unknown_service:java`)* |
71+
| `otel.resource.attributes` | Extra resource attributes to include in every span. Example: `attribute1=value1,attribute2=value2` | |
5072
| `otel.traces.exporter` | Comma-separated list of span exporters. Supported values are: `otlp`, `console`, `logging-otlp`, and `none`. | `otlp` |
5173
| `otel.exporter.otlp.traces.protocol` | The transport protocol to use on OTLP trace requests. Options include `grpc` and `http/protobuf`. | `grpc` |
5274
| `otel.exporter.otlp.traces.endpoint` | The endpoint to send all OTLP traces to. It must be a URL with a scheme of either http or https based on the use of TLS. | `http://localhost:4317` when the protocol is `grpc`<br>`http://localhost:4318` when the protocol is `http/protobuf` |
5375
| `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. |
5476
| `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. |
5577
| `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. |
56-
57-
In addition to the above settings, additional settings for OpenTelemetry can be passed as environment variables or system properties. We do not explicitly support these settings, but they will all be passed to the OpenTelemetry system in the runtime. [See here for a list of all OpenTelemetry settings.](https://opentelemetry.io/docs/languages/java/configuration/#environment-variables-and-system-properties)
78+
| `OpenTelemetry.Enabled` *(Mendix 10.18 only)*| Can be set to `true` or `false` in order to disable or enable tracing. | `false` |

0 commit comments

Comments
 (0)