-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(csharp/src/Drivers/Apache): tracing - work-in-progress #5
base: main
Are you sure you want to change the base?
Conversation
For this first iteration, is the thought how to establish a framework for the C# drivers to implement? I was thinking it was targeting the higher-level classes like AdbcConnection so that any of the drivers, including the ones used via Interop, would have the same base logging. |
csharp/src/Drivers/Apache/Apache.Arrow.Adbc.Drivers.Apache.csproj
Outdated
Show resolved
Hide resolved
…ort for AdbcConnection11 and AdbcStatement11
…ize and number of files
/// <summary> | ||
/// Gets the name of the <see cref="System.Diagnostics.ActivitySource"/> | ||
/// </summary> | ||
public string ActivitySourceName => ActivitySource.Name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an update to the public API. Is this allowed? Or will we need to stage this at a later time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative is to take a Driver/Connection property that sets the name of the ActivitySource
.
POC
Assumptions
CSharp
In csharp, using System.Diagnostics.DiagnosticSource package employing as it is the suggested way to enable OpenTelemetry compatible tracing.
ActivitySource
ActivityListener
Activity
ActivityEvent
Tags
Intent is to allow the passing of the "parent" span and trace id to the
AdbcStatement
usingTraceParent
,SetOption
or in theTraceActivity
overloads. The Execute* API methods will populate the parent context if the option is set.Sample output:
Successful activity (multiple calls to
ExecuteUpdateAsync
)Exception activity
Instrumentation
TraceActivity
in each significant method (seeOpenAsync
, for example)ActivityEvent
before and after its execution.TraceActivity
overloads handles thrown exceptions to trace the exception and then rethrow the exception.Exporting
Missing Features