Skip to content

Commit

Permalink
Use Enrich in .net framework
Browse files Browse the repository at this point in the history
  • Loading branch information
davhdavh authored Feb 7, 2023
1 parent da938d7 commit 611e25f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ private void OnBeginExecute(EventWrittenEventArgs eventData)
activity.SetTag(SemanticConventions.AttributeDbStatement, commandText);
}
}

try
{
this.options.Enrich?.Invoke(activity, "OnCustom", eventData.Payload);
}
catch (Exception ex)
{
SqlClientInstrumentationEventSource.Log.EnrichmentException(ex);
}
}

private void OnEndExecute(EventWrittenEventArgs eventData)
Expand Down

0 comments on commit 611e25f

Please sign in to comment.