RequireApplicationRootSpanCreation

This property controls whether ODP.NET instruments only those operations that are associated with root spans created by the application or not.

Declaration

// C#
public bool RequireApplicationRootSpanCreation { get; set; } 

Return Value

A bool

Remarks

Default value is false.

When a new activity/span is created, it becomes child of current (in progress) activity/span automatically. But if there is no span in progress and a new span is created, then it will become Root/parentless/orphan span.

Similarly, if the user application creates a span before calling ODP.NET instrumented methods, the span created by the user application becomes root span and all span created by ODP.NET become children of it.

If user application did not create a root span and call ODP.NET instrumented methods, the multiple parentless/orphan spans will be created because of no parent linking. These spans are hard to visualize and analyze.

Parentless/Orphan span are also generated by server/database round trip calls happening from background threads. parentless/orphan spans do not add much value in most scenarios because of missing parent linking. Using this option user/client can control parentless/orphan span tracing as per their needs.

By default, instrumentation of parentless/orphan span is enabled.

This means application need not create any activity before calling ODP.NET instrumented methods. But if the user sets this option to true, then the user application must create a root activity, otherwise no ODP.NET spans will be generated.