Skip to content

Latest commit

 

History

History
68 lines (54 loc) · 2.45 KB

README.md

File metadata and controls

68 lines (54 loc) · 2.45 KB

ABAP Open telemetry

ABAP Telemetry minimalistic implementation

[WIP] - work in progress! Some components may be changed

Why Otel?

This library allows us to trace abap code across multiple processes ( the picture is chose randomly, I'll create some better example in a separate project one day ) image

So you can bring your spans into a single trace from such sources as:

  • methods
  • FMs
  • RFC calls
  • Programs ( lunch via SUBMIT )
  • Batch jobs
  • HTTP handlers

Usage

" get tracer instance
data(trace) = zcl_otel_api=>traces( )->get_tracer( ).
" start span
data(span) = trace->start_span( 'Test trace' ).
" log span event
span->log( 'Span created' ).
" end span
span->end( ).

You can use span as a context for a child span

data(child_span)  = trace->start_span( name = 'Child span' context = span ).

By default this model is stateless - it's just raising ABAP events. To start handling these events our framework supports so called "plugins" or "middleware".

zcl_otel_trace=>api->use( your_handler_instance ).
zcl_otel_trace=>api->use( one_more_handler_instance ).

You can use as many handlers as you want. They will execute in the same order as they have been registered.

Prerequesites

Following libraries have to be installed prior to this package

We hope to find the solution to install dependencies automatically.

Built-in plugins

Stack info

With the code like this:

zcl_otel_trace=>api->use(
  new ZCL_OTEL_TRACE_PROCESSOR_STACK( )
 ).

we can have stack info in our span attributes which may later be useful for analysis or search: image image

Extensions

  • Telemetry via Logpoints PoC solution using built-in log-points as the way to store trace data. Background job takes care of exporting via HTTP. Perfect use case for ECC where there are no daemons and MQTT