Skip to content
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

Merge release/7.x to main #4715

Merged
merged 112 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from 109 commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
f100099
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Mar 16, 2023
bfbeef7
Update release information (#3979)
github-actions[bot] Mar 16, 2023
2845cdf
[release/7.x] Update trace-until-event to use shared code from `dotne…
schmittjoseph Mar 17, 2023
79d4db2
Sync branch with origin/main (#3997)
github-actions[bot] Mar 20, 2023
e0fe484
[release/7.x] Update dependencies from dotnet/command-line-api (#3988)
dotnet-maestro[bot] Mar 20, 2023
548818b
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Mar 21, 2023
487aaae
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Mar 22, 2023
e92af97
[release/7.x] Bump Microsoft.Identity.Web in /eng/dependabot (#4043)
dependabot[bot] Mar 24, 2023
3fe0174
sync branch with origin/main (#4057)
github-actions[bot] Mar 27, 2023
ea95f30
[release/7.x] Update dependencies from dotnet/command-line-api (#4050)
dotnet-maestro[bot] Mar 27, 2023
fd11bfd
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Mar 28, 2023
1f3f84d
[release/7.x] Bump Azure.Storage.Blobs in /eng/dependabot (#4065)
dependabot[bot] Mar 28, 2023
3b160f3
[release/7.x] Bump Azure.Storage.Queues in /eng/dependabot (#4066)
dependabot[bot] Mar 28, 2023
780e8fd
Represent SDM Counters as Gauges In Prometheus Exposition Format (#4100)
github-actions[bot] Mar 30, 2023
43eeee6
[release/7.x] Update dependencies from dotnet/command-line-api (#4091)
dotnet-maestro[bot] Mar 30, 2023
a4da65d
Revert "Reenable AspNetResponseStatusTest test (#3746)" (#4111) (#4112)
github-actions[bot] Mar 30, 2023
9adf021
[release/7.x] Bump Microsoft.Identity.Web in /eng/dependabot (#4104)
dependabot[bot] Mar 31, 2023
21a164f
sync branch with origin/main (#4125)
github-actions[bot] Apr 3, 2023
82a6f6d
[release/7.x] Bump Microsoft.IdentityModel.Tokens in /eng/dependabot …
dependabot[bot] Apr 3, 2023
878c72b
[release/7.x] Bump Microsoft.IdentityModel.Tokens in /eng/dependabot …
dependabot[bot] Apr 4, 2023
ddeb4ef
[release/7.x] Backport #3591 Allow per provider interval specificatio…
wiktork Apr 4, 2023
8d5b9a1
sync branch with origin/main (#4154)
github-actions[bot] Apr 4, 2023
5de80f0
Allow VS using repository SDK to build for latest TFM (#4128)
jander-msft Apr 5, 2023
0a5d453
[release/7.x] Update dependencies from dotnet/command-line-api (#4168)
dotnet-maestro[bot] Apr 6, 2023
b95aeea
sync branch with origin/main (#4183)
github-actions[bot] Apr 10, 2023
8b17585
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Apr 11, 2023
40f3d56
[release/7.x] Bump Microsoft.NETCore.App.Runtime.win-x64 (#4196)
dependabot[bot] Apr 11, 2023
e6904c7
[release/7.x] Bump Microsoft.NETCore.App.Runtime.win-x64 (#4198)
dependabot[bot] Apr 11, 2023
98ae228
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Apr 11, 2023
bf26c66
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Apr 12, 2023
d4e74e5
[release/7.x] Bump Azure.Storage.Blobs in /eng/dependabot (#4224)
dependabot[bot] Apr 12, 2023
efefa22
[release/7.x] Bump Azure.Storage.Queues in /eng/dependabot (#4223)
dependabot[bot] Apr 12, 2023
9bb4369
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Apr 13, 2023
00f35a8
[release/7.x] Bump dotnet-dump in /eng/dependabot (#4240)
dependabot[bot] Apr 13, 2023
aa68f91
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Apr 14, 2023
006154e
[release/7.x] Bump Microsoft.IdentityModel.Tokens in /eng/dependabot …
dependabot[bot] Apr 14, 2023
7ac85dd
sync branch with origin/main (#4267)
github-actions[bot] Apr 17, 2023
fb52a7f
[release/7.x] Bump Microsoft.Identity.Web in /eng/dependabot (#4273)
dependabot[bot] Apr 17, 2023
e752c74
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Apr 20, 2023
5c4946d
sync branch with origin/main (#4304)
github-actions[bot] Apr 24, 2023
d12bdae
Add stack frame information to exceptions event source (#4266)
jander-msft Apr 24, 2023
37abdef
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Apr 24, 2023
0c1f824
sync branch with origin/main (#4335)
github-actions[bot] May 1, 2023
542a9de
[release/7.x] Bump Microsoft.IdentityModel.Tokens in /eng/dependabot …
dependabot[bot] May 1, 2023
cc9b948
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] May 1, 2023
e3ac6c4
sync branch with origin/main (#4374)
github-actions[bot] May 8, 2023
41e49d2
[release/7.x] Bump Microsoft.OpenApi.Readers in /eng/dependabot (#4356)
dependabot[bot] May 8, 2023
0a46a4c
[release/7.x] Bump NJsonSchema from 10.8.0 to 10.9.0 in /eng/dependab…
dependabot[bot] May 8, 2023
65fa409
[release/7.x] Bump Microsoft.Identity.Web in /eng/dependabot (#4378)
dependabot[bot] May 8, 2023
4fdd343
Add timestamp information to exception history (#4392)
jander-msft May 12, 2023
9ac648a
sync branch with origin/main (#4414)
github-actions[bot] May 15, 2023
52effb3
[release/7.x] Bump Azure.Identity from 1.8.2 to 1.9.0 in /eng/dependa…
dependabot[bot] May 16, 2023
9230850
[release/7.x] Bump Microsoft.IdentityModel.Tokens in /eng/dependabot …
dependabot[bot] May 16, 2023
5f8614c
[release/7.x] Bump Microsoft.Identity.Web in /eng/dependabot (#4425)
dependabot[bot] May 16, 2023
91b1120
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] May 18, 2023
d358673
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] May 18, 2023
bed9f8c
sync branch with origin/main (#4463)
github-actions[bot] May 22, 2023
253f708
Enable workflow identity (#4313)
wiktork May 3, 2023
cc81e59
Fixup merge
wiktork May 23, 2023
ba819f3
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] May 23, 2023
03556ba
Merge pull request #4473 from wiktork/dev/wiktork/workloadId7.2
wiktork May 25, 2023
24e801e
Disable azure developer cli creds (#4347)
wiktork May 3, 2023
4fbcc62
Merge pull request #4479 from dotnet/backport/pr-4347-to-release/7.x
wiktork May 25, 2023
c64885f
sync branch with origin/main (#4486)
github-actions[bot] May 30, 2023
be5101f
update release information
invalid-email-address May 30, 2023
4e0d534
Merge pull request #4495 from dotnet/bot/releaseVersion/alpha-7.3.0
jander-msft May 31, 2023
504f0e4
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Jun 1, 2023
fb178e4
Update dependencies from https://github.com/dotnet/roslyn-analyzers b…
dotnet-maestro[bot] Jun 2, 2023
7f031db
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Jun 5, 2023
01713fa
sync branch with origin/main (#4527)
github-actions[bot] Jun 5, 2023
2ef416d
[release/7.x] Bump Microsoft.Identity.Web in /eng/dependabot (#4537)
dependabot[bot] Jun 6, 2023
9406191
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Jun 7, 2023
ec4af7c
Stable version file and link (#4555)
github-actions[bot] Jun 8, 2023
b422b86
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Jun 8, 2023
797fd8c
[release/7.x] Bump Microsoft.IdentityModel.Tokens in /eng/dependabot …
dependabot[bot] Jun 8, 2023
05a7ab3
Rename ExceptionIdentifer to ExceptionGroupIdentifier (#4577)
jander-msft Jun 9, 2023
652ad30
Update diagnostics repo dependencies (#4599)
jander-msft Jun 9, 2023
ab8d171
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Jun 9, 2023
50d85d8
[release/7.x] Bump dotnet-dump in /eng/dependabot (#4590)
dependabot[bot] Jun 9, 2023
7b3b02d
sync branch with origin/main (#4612)
github-actions[bot] Jun 12, 2023
52ae82a
Add exception instance identifiers to exceptions event source (#4597)
jander-msft Jun 12, 2023
34bb400
Create single file bundle (#4616)
jander-msft Jun 12, 2023
ff445e9
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Jun 13, 2023
262480e
[release/7.x] Bump Microsoft.NETCore.App.Runtime.win-x64 (#4630)
dependabot[bot] Jun 13, 2023
0a8fce1
[release/7.x] Bump Microsoft.Extensions.Logging.Abstractions (#4636)
dependabot[bot] Jun 13, 2023
ba9f501
[release/7.x] Bump Microsoft.NETCore.App.Runtime.win-x64 (#4638)
dependabot[bot] Jun 13, 2023
e9e4eb8
Fix build output test assembly path (#4648)
jander-msft Jun 14, 2023
d6f7c3d
[Exceptions] Report Stack Frame Information (#4471)
kkeirstead Jun 14, 2023
4e7e47c
Generate unique ID for each exception instance (#4650)
jander-msft Jun 14, 2023
9b6fc82
Capture inner exceptions in startup hook (#4649)
jander-msft Jun 14, 2023
8937249
Remove InnerExceptionId payload and ThrowingMethodName property (#4651)
jander-msft Jun 15, 2023
ebec181
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Jun 16, 2023
43bc3d5
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Jun 16, 2023
547e347
Add inner exception information to exception store (#4654)
jander-msft Jun 17, 2023
068a331
sync branch with origin/main (#4679)
github-actions[bot] Jun 19, 2023
5684c6c
Update dependencies from https://github.com/dotnet/arcade build 20230…
dotnet-maestro[bot] Jun 19, 2023
1ba9c9b
[release/7.x] Bump Microsoft.Identity.Web in /eng/dependabot (#4686)
dependabot[bot] Jun 19, 2023
b58ed23
[release/7.x] Bump Microsoft.OpenApi.Readers in /eng/dependabot (#4687)
dependabot[bot] Jun 19, 2023
fda381a
Publish single file bundle to blob storage (#4660)
jander-msft Jun 19, 2023
e959265
Update dependencies from https://github.com/dotnet/command-line-api b…
dotnet-maestro[bot] Jun 21, 2023
959c435
Report inner exception information in exceptions route (#4709)
jander-msft Jun 22, 2023
4ee9af0
Merge branch 'release/7.x' of https://github.com/dotnet/dotnet-monito…
jander-msft Jun 22, 2023
bbb91cf
Explicitly opt out of self-contained for extensions
jander-msft Jun 22, 2023
1a89f44
Fix extension location relative to running executable
jander-msft Jun 22, 2023
78e7ef3
Fix native library initialization in unit test app
jander-msft Jun 22, 2023
2d47c22
[Exceptions] Add Method Parameter Types (#4673)
kkeirstead Jun 22, 2023
c1dcb18
Merge branch 'release/7.x' of https://github.com/dotnet/dotnet-monito…
jander-msft Jun 23, 2023
9faf9a9
Use SkipPublishProjects to prevent publish during single file copying
jander-msft Jun 23, 2023
003c338
Add SelfContained=true to single file bundle
jander-msft Jun 23, 2023
59ef2d7
Remove duplicate version
jander-msft Jun 23, 2023
65b66c0
Use embedded WebApi documentation file for OpenApi XML comments (#4716)
jander-msft Jun 23, 2023
e5acdea
Merge branch 'release/7.x' of https://github.com/dotnet/dotnet-monito…
jander-msft Jun 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eng/AfterSolutionBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
<Import Project="$(RepoRoot)src\archives\AzureBlobStorage\ProjectsToPublish.props" />
<Import Project="$(RepoRoot)src\archives\S3Storage\ProjectsToPublish.props" />
<Import Project="$(RepoRoot)src\Microsoft.Diagnostics.Monitoring.StartupHook\ProjectsToPublish.props" />
<Import Project="$(RepoRoot)src\singlefile\dotnet-monitor\ProjectsToPublish.props" />

<!-- Only publish projects after build if opt-in and not skipped -->
<Target Name="PublishProjectsAfterBuild"
AfterTargets="Build"
Condition="'$(PublishProjectsAfterBuild)' == 'true' and '$(SkipPublishProjects)' != 'true'">
Condition="'$(PublishProjectsAfterBuild)' == 'true' and '$(CreateArchives)' != 'true' and '$(CreateSingleFileBundles)' != 'true' and '$(SkipPublishProjects)' != 'true'">
<CallTarget Targets="PublishProjects" />
</Target>

Expand Down
2 changes: 2 additions & 0 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
Condition="'$(CreateArchives)' == 'true'" />
<Import Project="$(RepoRoot)src\archives\S3Storage\ProjectsToBuild.props"
Condition="'$(CreateArchives)' == 'true'" />
<Import Project="$(RepoRoot)src\singlefile\dotnet-monitor\ProjectsToBuild.props"
Condition="'$(CreateSingleFileBundles)' == 'true'" />
</Project>
1 change: 1 addition & 0 deletions eng/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
<LatestTargetFramework>net8.0</LatestTargetFramework>
<LatestToolTargetFramework>$(LatestTargetFramework)</LatestToolTargetFramework>
<OlderToolTargetFramework>net6.0</OlderToolTargetFramework>
<ArtifactsNonShippingBundlesDir>$(ArtifactsDir)bundles\$(Configuration)\NonShipping\</ArtifactsNonShippingBundlesDir>
</PropertyGroup>
</Project>
1 change: 0 additions & 1 deletion eng/PublishProjects.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project>

<PropertyGroup>
<SharedPublishProjectProperties>SelfContained=false</SharedPublishProjectProperties>
<SharedPublishProjectProperties>$(SharedPublishProjectProperties);UseAppHost=true</SharedPublishProjectProperties>
<SharedPublishProjectProperties>$(SharedPublishProjectProperties);PackAsTool=false</SharedPublishProjectProperties>
</PropertyGroup>
Expand Down
20 changes: 19 additions & 1 deletion eng/Publishing.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<PropertyGroup>
<PublishDependsOnTargets>$(PublishDependsOnTargets);CollectPackageArtifactFiles;CollectVersionArtifactFiles</PublishDependsOnTargets>
<PublishDependsOnTargets>$(PublishDependsOnTargets);CollectPackageArtifactFiles;CollectBundleArtifactFiles;CollectVersionArtifactFiles</PublishDependsOnTargets>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,6 +18,10 @@
<PackageFile Include="$(ArtifactsNonShippingPackagesDir)**/*.zip" IsShipping="false" />
</ItemGroup>

<ItemGroup>
<BundleFile Include="$(ArtifactsNonShippingBundlesDir)*" IsShipping="false" />
</ItemGroup>

<Target Name="CalculateBlobGroupAndBuildVersion">
<PropertyGroup>
<!--
Expand Down Expand Up @@ -200,6 +204,20 @@
</ItemGroup>
</Target>

<Target Name="CollectBundleArtifactFiles"
DependsOnTargets="CalculateBlobGroupAndBuildVersion">
<ItemGroup>
<ItemsToPushToBlobFeed Include="@(BundleFile)"
RemoveMetadata="IsShipping"
Condition="'$(_BuildVersion)' != ''">
<!-- Place blobs into versioned container so that stable versions (or lack of version) do not collide. -->
<RelativeBlobPath>diagnostics/monitor/$(_BuildVersion)/%(BundleFile.Filename)%(BundleFile.Extension)</RelativeBlobPath>
<ManifestArtifactData Condition="'%(BundleFile.IsShipping)' != 'true'">NonShipping=true</ManifestArtifactData>
<PublishFlatContainer>true</PublishFlatContainer>
</ItemsToPushToBlobFeed>
</ItemGroup>
</Target>

<Target Name="CollectVersionArtifactFiles"
DependsOnTargets="CalculateBlobGroupAndBuildVersion">
<PropertyGroup>
Expand Down
4 changes: 4 additions & 0 deletions eng/dependabot/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
<SwashbuckleAspNetCoreVersion>6.5.0</SwashbuckleAspNetCoreVersion>
<AwsSdkS3Version>3.5.8.1</AwsSdkS3Version>

<!-- Release-branch specific reference -->
<!-- dotnet/diagnostics references -->
<MicrosoftDiagnosticsMonitoringShippedVersion>7.0.430602</MicrosoftDiagnosticsMonitoringShippedVersion>

<!--
jander-msft marked this conversation as resolved.
Show resolved Hide resolved
Moq version & constants derived from Moq.
The MoqInternalsVisibleTo* properties are not managed by Dependabot and may need to be updated incase a new version of Moq ever changes them.
Expand Down
7 changes: 7 additions & 0 deletions eng/pipelines/jobs/build-archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
-skipmanaged
-skipnative
/p:SkipPublishProjects=true
/p:CreateSingleFileBundles=true
/p:ThirdPartyNoticesFilePath='$(Build.SourcesDirectory)/$(_TPNFile)'

postBuildSteps:
Expand All @@ -44,6 +45,12 @@ jobs:
inputs:
SourceFolder: '$(Build.SourcesDirectory)/artifacts/packages'
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages'

- task: CopyFiles@2
displayName: Gather Artifacts (bundles)
inputs:
SourceFolder: '$(Build.SourcesDirectory)/artifacts/bundles'
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bundles'

- task: PublishBuildArtifacts@1
displayName: Publish Artifacts (Unified)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,12 +490,13 @@
<comment>The description provided for the DumpTempFolder parameter on StorageOptions.</comment>
</data>
<data name="ErrorMessage_CredentialsMissing" xml:space="preserve">
<value>The {0} field, {1} field, or {2} field is required.</value>
<comment>Gets the format string for rejecting validation due to 3 missing fields where at least one is required.
3 Format Parameters:
<value>The {0} field, {1} field, {2} field, or {3} field is required.</value>
<comment>Gets the format string for rejecting validation due to 4 missing fields where at least one is required.
4 Format Parameters:
0. fieldNameOne: The name of the first field that is missing
1. fieldNameTwo: The name of the second field that is missing
2. fieldNameThree: The name of the third field that is missing</comment>
2. fieldNameThree: The name of the third field that is missing
3. fieldNameFour: The name of the fourth field that is missing</comment>
</data>
<data name="DisplayAttributeDescription_CollectLogsOptions_Format" xml:space="preserve">
<value>The format of the logs artifact.</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ public void Start()

private static void ConfigurePipeline(ExceptionPipelineBuilder builder)
{
// Process current exception and its inner exceptions
builder.Add(next => new ExceptionDemultiplexerPipelineStep(next).Invoke);
// Prevent rethrows from being evaluated; only care about origination of exceptions.
builder.Add(next => new FilterRepeatExceptionPipelineStep(next).Invoke);
// Report exception through event source
builder.Add(next => new ExceptionEventsPipelineStep(next).Invoke);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public CurrentAppDomainExceptionSource()

private void CurrentDomain_FirstChanceException(object? sender, FirstChanceExceptionEventArgs e)
{
DateTime timestamp = DateTime.UtcNow;

if (_handlingException.Value)
{
// Exception handling is already in progress on this thread. The current exception is likely
Expand All @@ -38,7 +40,7 @@ private void CurrentDomain_FirstChanceException(object? sender, FirstChanceExcep
{
_handlingException.Value = true;

RaiseExceptionThrown(e.Exception);
RaiseExceptionThrown(e.Exception, timestamp);
}
catch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,35 +46,47 @@ protected override void Dispose(bool disposing)
base.Dispose(disposing);
}

[Event(ExceptionEvents.EventIds.ExceptionIdentifier)]
public void ExceptionIdentifier(
ulong ExceptionId,
[Event(ExceptionEvents.EventIds.ExceptionGroup)]
public void ExceptionGroup(
ulong ExceptionGroupId,
ulong ExceptionClassId,
ulong ThrowingMethodId,
int ILOffset)
{
Span<EventData> data = stackalloc EventData[4];

SetValue(ref data[ExceptionEvents.ExceptionIdentifierPayloads.ExceptionId], ExceptionId);
SetValue(ref data[ExceptionEvents.ExceptionIdentifierPayloads.ExceptionClassId], ExceptionClassId);
SetValue(ref data[ExceptionEvents.ExceptionIdentifierPayloads.ThrowingMethodId], ThrowingMethodId);
SetValue(ref data[ExceptionEvents.ExceptionIdentifierPayloads.ILOffset], ILOffset);
SetValue(ref data[ExceptionEvents.ExceptionGroupPayloads.ExceptionGroupId], ExceptionGroupId);
SetValue(ref data[ExceptionEvents.ExceptionGroupPayloads.ExceptionClassId], ExceptionClassId);
SetValue(ref data[ExceptionEvents.ExceptionGroupPayloads.ThrowingMethodId], ThrowingMethodId);
SetValue(ref data[ExceptionEvents.ExceptionGroupPayloads.ILOffset], ILOffset);

WriteEventCore(ExceptionEvents.EventIds.ExceptionIdentifier, data);
WriteEventCore(ExceptionEvents.EventIds.ExceptionGroup, data);

RestartFlushingEventTimer();
}

[Event(ExceptionEvents.EventIds.ExceptionInstance)]
public void ExceptionInstance(
ulong ExceptionId,
string? ExceptionMessage)
ulong ExceptionGroupId,
string? ExceptionMessage,
ulong[] StackFrameIds,
DateTime Timestamp,
ulong[] InnerExceptionIds)
{
Span<EventData> data = stackalloc EventData[2];
Span<EventData> data = stackalloc EventData[6];
using PinnedData namePinned = PinnedData.Create(ExceptionMessage);
Span<byte> stackFrameIdsSpan = stackalloc byte[GetArrayDataSize(StackFrameIds)];
FillArrayData(stackFrameIdsSpan, StackFrameIds);
Span<byte> innerExceptionIdsSpan = stackalloc byte[GetArrayDataSize(InnerExceptionIds)];
FillArrayData(innerExceptionIdsSpan, InnerExceptionIds);

SetValue(ref data[ExceptionEvents.ExceptionInstancePayloads.ExceptionId], ExceptionId);
SetValue(ref data[ExceptionEvents.ExceptionInstancePayloads.ExceptionGroupId], ExceptionGroupId);
SetValue(ref data[ExceptionEvents.ExceptionInstancePayloads.ExceptionMessage], namePinned);
SetValue(ref data[ExceptionEvents.ExceptionInstancePayloads.StackFrameIds], stackFrameIdsSpan);
SetValue(ref data[ExceptionEvents.ExceptionInstancePayloads.Timestamp], Timestamp.ToFileTimeUtc());
SetValue(ref data[ExceptionEvents.ExceptionInstancePayloads.InnerExceptionIds], innerExceptionIdsSpan);

WriteEventCore(ExceptionEvents.EventIds.ExceptionInstance, data);

Expand Down Expand Up @@ -111,19 +123,23 @@ public void FunctionDescription(
uint ClassToken,
ulong ModuleId,
string Name,
ulong[] TypeArgs)
ulong[] TypeArgs,
ulong[] ParameterTypes)
{
Span<EventData> data = stackalloc EventData[6];
Span<EventData> data = stackalloc EventData[7];
using PinnedData namePinned = PinnedData.Create(Name);
Span<byte> typeArgsSpan = stackalloc byte[GetArrayDataSize(TypeArgs)];
FillArrayData(typeArgsSpan, TypeArgs);
Span<byte> parameterTypesSpan = stackalloc byte[GetArrayDataSize(ParameterTypes)];
FillArrayData(parameterTypesSpan, ParameterTypes);

SetValue(ref data[NameIdentificationEvents.FunctionDescPayloads.FunctionId], FunctionId);
SetValue(ref data[NameIdentificationEvents.FunctionDescPayloads.ClassId], ClassId);
SetValue(ref data[NameIdentificationEvents.FunctionDescPayloads.ClassToken], ClassToken);
SetValue(ref data[NameIdentificationEvents.FunctionDescPayloads.ModuleId], ModuleId);
SetValue(ref data[NameIdentificationEvents.FunctionDescPayloads.Name], namePinned);
SetValue(ref data[NameIdentificationEvents.FunctionDescPayloads.TypeArgs], typeArgsSpan);
SetValue(ref data[NameIdentificationEvents.FunctionDescPayloads.ParameterTypes], parameterTypesSpan);

WriteEventCore(ExceptionEvents.EventIds.FunctionDescription, data);

Expand All @@ -146,6 +162,23 @@ public void ModuleDescription(
RestartFlushingEventTimer();
}

[Event(ExceptionEvents.EventIds.StackFrameDescription)]
public void StackFrameDescription(
ulong StackFrameId,
ulong FunctionId,
int ILOffset)
{
Span<EventData> data = stackalloc EventData[3];

SetValue(ref data[ExceptionEvents.StackFrameIdentifierPayloads.StackFrameId], StackFrameId);
SetValue(ref data[ExceptionEvents.StackFrameIdentifierPayloads.FunctionId], FunctionId);
SetValue(ref data[ExceptionEvents.StackFrameIdentifierPayloads.ILOffset], ILOffset);

WriteEventCore(ExceptionEvents.EventIds.StackFrameDescription, data);

RestartFlushingEventTimer();
}

[Event(ExceptionEvents.EventIds.TokenDescription)]
public void TokenDescription(
ulong ModuleId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace Microsoft.Diagnostics.Monitoring.StartupHook.Exceptions.Eventing
{
internal sealed class ExceptionsEventSourceIdentifierCacheCallback :
ExceptionIdentifierCacheCallback
ExceptionGroupIdentifierCacheCallback
{
private readonly ExceptionsEventSource _source;

Expand All @@ -25,10 +25,10 @@ public override void OnClassData(ulong classId, ClassData data)
data.TypeArgs);
}

public override void OnExceptionIdentifier(ulong registrationId, ExceptionIdentifierData data)
public override void OnExceptionGroupData(ulong groupId, ExceptionGroupData data)
{
_source.ExceptionIdentifier(
registrationId,
_source.ExceptionGroup(
groupId,
data.ExceptionClassId,
data.ThrowingMethodId,
data.ILOffset);
Expand All @@ -42,7 +42,8 @@ public override void OnFunctionData(ulong functionId, FunctionData data)
data.ParentToken,
data.ModuleId,
data.Name,
data.TypeArgs);
data.TypeArgs,
data.ParameterTypes);
}

public override void OnModuleData(ulong moduleId, ModuleData data)
Expand All @@ -52,6 +53,14 @@ public override void OnModuleData(ulong moduleId, ModuleData data)
data.Name);
}

public override void OnStackFrameData(ulong frameId, StackFrameData data)
{
_source.StackFrameDescription(
frameId,
data.MethodId,
data.ILOffset);
}

public override void OnTokenData(ulong moduleId, uint typeToken, TokenData data)
{
_source.TokenDescription(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;

namespace Microsoft.Diagnostics.Monitoring.StartupHook.Exceptions
{
internal sealed class ExceptionEventArgs : EventArgs
{
public ExceptionEventArgs(Exception exception, DateTime timestamp)
{
Exception = exception;
Timestamp = timestamp;
}

public Exception Exception { get; }

public DateTime Timestamp { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ namespace Microsoft.Diagnostics.Monitoring.StartupHook.Exceptions
/// </summary>
internal abstract class ExceptionSourceBase
{
protected void RaiseExceptionThrown(Exception ex)
protected void RaiseExceptionThrown(Exception ex, DateTime timestamp)
{
ExceptionThrown?.Invoke(this, ex);
ExceptionThrown?.Invoke(this, new ExceptionEventArgs(ex, timestamp));
}

/// <summary>
/// Event that is raised each time an exception is thrown.
/// </summary>
public event EventHandler<Exception>? ExceptionThrown;
public event EventHandler<ExceptionEventArgs>? ExceptionThrown;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Microsoft.Diagnostics.Monitoring.StartupHook.Exceptions.Identification
{
internal sealed class ExceptionIdentifierData
internal sealed class ExceptionGroupData
{
public ulong ExceptionClassId { get; set; }
public ulong ThrowingMethodId { get; set; }
Expand Down
Loading