GeneXus the compilation of the telemetry data (traces, logs and metrics) of applications with OpenTelemetry.

The steps you should follow to use it are:
- Activate the Observability Provider property.
- Execute the OpenTelemetry collector.
- Configure the Environment Variables of the application’s Docker image.
- Configure the Collector with an Observability Backend.
- Execute Docker image.
To activate the property you should follow the steps detailed in Observability of your GeneXus applications.
Follow the document Getting Started to execute the collector.
Configure the following environment variables in the application’s Docker Image.
For more information, refer to: SDK Configuration.
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
OTEL_RESOURCE_ATTRIBUTES=service.namespace=GeneXus,service.name=sample-app,service.version=1.0.1
- OTEL_METRICS_EXPORTER=otlp
Refer to the Configure document.
And to end, execute the application’s Docker image.
It is possible to execute OpenTelemetry through Docker Compose.
You may execute the following compose.yaml that has the configured collector connected to the GeneXus application to be deployed.
otel-collector-confing.yaml sample can be seen here: https://opentelemetry.io/docs/collector/configuration/
compose.yaml:
version: "2"
services:
# Collector
otel-collector:
image: otel/opentelemetry-collector-dev:latest
command: ["--config=/etc/otel-collector-config.yaml", ""]
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP Http receiver
smaplegenexusapp:
build:
context: .
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
- OTEL_RESOURCE_ATTRIBUTES=service.namespace=GeneXus,service.name=sample-app,service.version=1.0.1
- OTEL_METRICS_EXPORTER=otlp
- GX_LOG_LEVEL=info
- GX_LOG_LEVEL_USER=debug
- GX_LOG_OUTPUT=ConsoleAppender
ports:
- "80:80"
Generator: Java, .NET
This functionality is available as Beta since GeneXus 18 Upgrade 2.
Log settings with environment variables