Skip to content

Commit 52f03d8

Browse files
authored
Merge pull request mendix#10762 from jdiehl/patch-529863
Enhance tracing documentation with Grafana support
2 parents 5380a60 + 83626fc commit 52f03d8

2 files changed

Lines changed: 47 additions & 8 deletions

File tree

content/en/docs/refguide/runtime/monitoring-mendix-runtime.md

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ For that you need to do three things:
553553

554554
[//]: # (<!-- markdownlint-disable no-duplicate-heading -->)
555555

556-
### Example Response
556+
#### Example Response
557557

558558
```json
559559
{
@@ -579,7 +579,7 @@ If the `feedback` is not empty use the name of your current log subscriber in th
579579
{"action": "remove_log_subscriber", "params": {"name": "ConsoleLogSubscriber"}}
580580
```
581581

582-
### Example Response
582+
#### Example Response
583583

584584
```json
585585
{
@@ -590,7 +590,7 @@ If the `feedback` is not empty use the name of your current log subscriber in th
590590

591591
It is possible to have multiple log subscribers running simultaneously, if several log subscribers were created then each of them will be writing the same log lines.
592592

593-
### Request to Create New Log Subscriber in Json Format
593+
### Request to Create New Log Subscriber in JSON Format
594594

595595
```json
596596
{
@@ -607,7 +607,7 @@ It is possible to have multiple log subscribers running simultaneously, if sever
607607
}
608608
```
609609

610-
### Example Response
610+
#### Example Response
611611

612612
```json
613613
{
@@ -616,7 +616,7 @@ It is possible to have multiple log subscribers running simultaneously, if sever
616616
}
617617
```
618618

619-
This will write logs to standard output in Json format. If you need to add extra static fields to tag logs then you can add them into `tags`, in this example `ddtags` and `service` are added.
619+
This will write logs to standard output in JSON format. If you need to add extra static fields to tag logs then you can add them into `tags`, in this example `ddtags` and `service` are added.
620620
This configuration will produce logs similar to these:
621621

622622
```json
@@ -637,7 +637,7 @@ This configuration will produce logs similar to these:
637637
}
638638
```
639639

640-
### Example Response
640+
#### Example Response
641641

642642
```json
643643
{
@@ -649,3 +649,27 @@ This configuration will produce logs similar to these:
649649
This will write logs to standard output in simple text format.
650650

651651
[//]: # (<!-- markdownlint-enable no-duplicate-heading -->)
652+
653+
### Request to Create New Log Subscriber in Open Telemetry Format {#new-log-sub-opentelemetry}
654+
655+
```json
656+
{
657+
"action": "create_log_subscriber",
658+
"params": {
659+
"type": "opentelemetry",
660+
"name": "OpenTelemetrySubscriber",
661+
"autosubscribe": "INFO"
662+
}
663+
}
664+
```
665+
666+
#### Example Response
667+
668+
```json
669+
{
670+
"feedback": {},
671+
"result": 0
672+
}
673+
```
674+
675+
This will send logs to the registered OpenTelemetry collector. See [Tracing](/refguide/tracing-in-runtime/) for a guide on how to enable OpenTelemetry.

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

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,15 @@ You can filter out specific traces using the `mendix.tracing.filter` system prop
5050

5151
### Testing
5252

53-
You can test the tracing using [Jaeger](https://www.jaegertracing.io/). For example, you can use the all-in-one binary or Docker image. Jaeger will listen to endpoint `http://localhost:4318/v1/traces` by default.
53+
You can test the tracing using [Jaeger](https://www.jaegertracing.io/) or [Grafana](https://grafana.com).
54+
55+
For Jaeger, you can use the all-in-one binary or Docker image. Jaeger will listen to endpoint `http://localhost:4318/v1/traces` by default.
56+
57+
For Grafana, you can use the all-in-one Docker image `grafana/otel-lgtm`. After starting it with the following command, it will listen to the endpoint `http://localhost:4318/v1/traces`.
58+
59+
```
60+
docker run --name otel-grafana -d -p 3000:3000 -p 4317:4317 -p 4318:4318 grafana/otel-lgtm
61+
```
5462

5563
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.
5664

@@ -61,7 +69,7 @@ The following settings are supported by the Mendix runtime. See [Configure the S
6169
You can configure the Java Agent 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.
6270

6371
| Name | Description | Default |
64-
|------|-------------|---------|
72+
| ---- | ----------- | ------- |
6573
| `otel.service.name` | The name of the service. | `runtimelauncher` |
6674
| `otel.resource.attributes` | Extra resource attributes to include in every span. Example: `attribute1=value1,attribute2=value2` | |
6775
| `otel.traces.exporter` | Comma-separated list of span exporters. Supported values are: `otlp`, `console`, `logging-otlp`, and `none`. | `otlp` |
@@ -137,3 +145,10 @@ To use the OpenTelemetry Collector with Datadog, follow these steps:
137145
1. Install the OpenTelemetry Collector by following the official [installation guide](https://opentelemetry.io/docs/collector/installation/).
138146
2. Install the `otelcol_contrib` package instead of `otelcol` to include Datadog support.
139147
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.
148+
149+
## Include Metrics and Logs in OpenTelemetry
150+
151+
You can also collect metrics data (CPU load, memory, etc.) and logs using OpenTelemetry.
152+
153+
* See the [OpenTelemetry](/refguide/metrics/#opentelemetry) section of *Metrics* for a guide on how to setup metrics with OpenTelemetry.
154+
* See [Request to Create New Log Subscriber in Open Telemetry Format](/refguide/monitoring-mendix-runtime/#new-log-sub-opentelemetry) in *Monitoring Mendix Runtime* for a guide on how to setup logs with OpenTelemetry.

0 commit comments

Comments
 (0)