HowTo: Observability of your GeneXus applications

Official Content
This documentation is valid for:

 The purpose of this article is to explain the necessary steps to allow OpenTelemetry for your applications’ observability. 

Steps

1. Activate Observability in GeneXus.

In Observability Provider property, select the service with which you desire the observability of your applications.  

2. Build any object.

3. Deploy.

Note: For Java applications, the Observability support is available only for applications deployed through Docker (Containers).

4. Configure the app with the Observability data, according to the provider selected:

Display GeneXus logs at trace level

The connection between Logs and Traces is achieved by registering the trace_id in the Logs. To achieve this with GeneXus Java Generator, you only need to set the Log Format property = JSON  and the Observability Provider property must take a value other than None. 

Sample

Suppose you are working in a Java environment and you have configured the following properties:

Log Format property = JSON
Observability Provider property = Observability with AWS Distro for OpenTelemetry. 

Then a Log showing this connection will look like this:

{
    "@timestamp": "2023-09-25T05:02:11.812Z",
    "ecs.version": "1.2.0",
    "log.level": "DEBUG",
    "message": "Hello, world!",
    "process.thread.name": "http-nio-8080-exec-165",
    "log.logger": "GeneXusUserLog.GBrain.Middleware.Utils.ResponseExtractText",
    "AWS-XRAY-TRACE-ID": "1-65111441-4939baba8728c6453e80769f@a6ad1d8bfe037e4f",
    "span_id": "a6ad1d8bfe037e4f",
    "trace_flags": "01",
    "trace_id": "651114414939baba8728c6453e80769f"
}