Official Content

The GeneXusObservability.Tracer External Object uses an instrumentation scope name and instrumentation scope version to obtain a tracer to instrument the code and collect telemetry information for observability in your program.

The instrumentation scope name and instrumentation scope version are used to initialize the Tracer when you first call a method (i.e. CreateSpan).

The information is passed through environment variables and the logic is as follows:

Java Generator

Reads JAVA_INSTRUMENTATION_SCOPE_NAME and JAVA_INSTRUMENTATION_SCOPE_VERSION environment variables.

If any of the above is empty, it does the same as the .NET generator.

.NET Generator

The following is processed to get the instrumentation-scope-name.

Reads the OTEL_SERVICE_NAME environment variable to be used as the instrumentation-scope-name.
If it's empty, it reads the OTEL_RESOURCE_ATTRIBUTES environment variable to get the service.name key/value pair. 
If it's empty, it uses instrumentation-scope-name= "GeneXus.Tracing".

The following is done to get the instrumentation-scope-version.

Reads the OTEL_SERVICE_VERSION environment variable to be used as the instrumentation-scope-version.
If it's empty, it reads the OTEL_RESOURCE_ATTRIBUTES environment variable to get the service.version key/value pair. 
If it's empty, instrumentation-scope-version is left empty.

 

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