Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
reyang committed Aug 7, 2020
1 parent 6b16a2f commit 5a86fba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/OpenTelemetry/Sdk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ public static TracerProvider CreateTracerProvider(IEnumerable<string> sources, S
{
var pattern = "^(" + string.Join("|", from name in sources select '(' + Regex.Escape(name).Replace("\\*", ".*") + ')') + ")$";
var regex = new Regex(pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);

// Function which takes ActivitySource and returns true/false to indicate if it should be subscribed to
// or not.
listener.ShouldListenTo = (activitySource) => regex.IsMatch(activitySource.Name);
}
else
Expand Down

0 comments on commit 5a86fba

Please sign in to comment.