Official Content

Instrumentation is the act of adding observability code to an app.
The objects that compose the GeneXusObservability module are for adding distributed tracing instrumentation manually.
That is, to add new custom distributed tracing instrumentation in addition to the one we already have in GeneXus applications when Opentelemetry is activated. For more information, see HowTo: Observability of your GeneXus applications.

Manually instrumenting your applications with OpenTelemetry gives you greater control over what to track and monitor. Nevertheless, note that adding custom Spans to Traces involves an advanced tool, and in many cases the basic instrumentation would be enough, without the need to add additional spans.

   Note
   The recommendation is to use automatic instrumentation to get started
   and then enrich your code with manual instrumentation as needed.
   Note, that especially if you cannot modify the source code of your app, you can skip manual  instrumentation
   and only use automatic instrumentation.

OpenTelemetry is a powerful tool, and proper instrumentation requires careful consideration of what metrics, traces, and logs are essential for your specific use case.

GeneXusObservability module

Currently, the GeneXusObservability module provides an API to manage custom Spans within your application's traces.

The module has a folder named Tracing, with the following External Objects:

  Note 
  In order to instrument your application using this module, you have to set Observability Provider property
  and configure all the necessary settings to have Opentelemetry working in your environment.

Scenarios of use

Manual instrumentation can be used to instrument any part of the application code.
Some of the scenarios where you could use this functionality are the following:

  • Detect the cause of slowness or malfunction in a program.
  • Mark a section of the program that is working slowly or poorly; for example, the login. In this case, Opentelemetry will give information about what is happening, and how long the request takes. You can even add information such as the User Id as an Attribute within the OpenTelemetry SPAN.
  • Throw a recordException given any exception in the scope of the span.

Availability

Since GeneXus 18 Upgrade 9

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant