Skip to content

Commit

Permalink
GenericDiagnosticOptions.IgnoreEvent() was removed by mistake; Privat…
Browse files Browse the repository at this point in the history
…eAssets() was missing on System.Data.SqlClient for .NET 5; fixes broken release-notes link in NuGet package
  • Loading branch information
cwe1ss committed Dec 12, 2020
1 parent c6213e4 commit 423d556
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageIconUrl>https://avatars0.githubusercontent.com/u/15482765</PackageIconUrl>
<PackageProjectUrl>https://github.com/opentracing-contrib/csharp-netcore</PackageProjectUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageReleaseNotes Condition="'$(Version)' != ''">https://github.com/opentracing-contrib/csharp-netcore/releases/tag/$(Version)</PackageReleaseNotes>
<PackageReleaseNotes Condition="'$(Version)' != ''">https://github.com/opentracing-contrib/csharp-netcore/releases/tag/v$(Version)</PackageReleaseNotes>

<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,21 @@ public sealed class GenericDiagnosticOptions
public HashSet<string> IgnoredListenerNames { get; } = new HashSet<string>();

public Dictionary<string, HashSet<string>> IgnoredEvents { get; } = new Dictionary<string, HashSet<string>>();

public void IgnoreEvent(string diagnosticListenerName, string eventName)
{
if (diagnosticListenerName == null || eventName == null)
return;

HashSet<string> ignoredListenerEvents;

if (!IgnoredEvents.TryGetValue(diagnosticListenerName, out ignoredListenerEvents))
{
ignoredListenerEvents = new HashSet<string>();
IgnoredEvents.Add(diagnosticListenerName, ignoredListenerEvents);
}

ignoredListenerEvents.Add(eventName);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Instrumented components: HttpClient calls, ASP.NET Core, Entity Framework Core a
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.0.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[5.0.1,6)" PrivateAssets="All" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="[5.0.1,6)" PrivateAssets="All" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.2" PrivateAssets="All" />
</ItemGroup>

</Project>

0 comments on commit 423d556

Please sign in to comment.