Skip to content

Commit 4ee9af0

Browse files
committed
Merge branch 'release/7.x' of https://github.com/dotnet/dotnet-monitor into main
2 parents 7f6b60a + 959c435 commit 4ee9af0

File tree

73 files changed

+2219
-910
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2219
-910
lines changed

eng/AfterSolutionBuild.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
<Import Project="$(RepoRoot)src\archives\AzureBlobStorage\ProjectsToPublish.props" />
55
<Import Project="$(RepoRoot)src\archives\S3Storage\ProjectsToPublish.props" />
66
<Import Project="$(RepoRoot)src\Microsoft.Diagnostics.Monitoring.StartupHook\ProjectsToPublish.props" />
7+
<Import Project="$(RepoRoot)src\singlefile\dotnet-monitor\ProjectsToPublish.props" />
78

89
<!-- Only publish projects after build if opt-in and not skipped -->
910
<Target Name="PublishProjectsAfterBuild"
1011
AfterTargets="Build"
11-
Condition="'$(PublishProjectsAfterBuild)' == 'true' and '$(SkipPublishProjects)' != 'true'">
12+
Condition="'$(PublishProjectsAfterBuild)' == 'true' and '$(CreateArchives)' != 'true' and '$(CreateSingleFileBundles)' != 'true' and '$(SkipPublishProjects)' != 'true'">
1213
<CallTarget Targets="PublishProjects" />
1314
</Target>
1415

eng/Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
Condition="'$(CreateArchives)' == 'true'" />
77
<Import Project="$(RepoRoot)src\archives\S3Storage\ProjectsToBuild.props"
88
Condition="'$(CreateArchives)' == 'true'" />
9+
<Import Project="$(RepoRoot)src\singlefile\dotnet-monitor\ProjectsToBuild.props"
10+
Condition="'$(CreateSingleFileBundles)' == 'true'" />
911
</Project>

eng/Common.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
<LatestTargetFramework>net8.0</LatestTargetFramework>
55
<LatestToolTargetFramework>$(LatestTargetFramework)</LatestToolTargetFramework>
66
<OlderToolTargetFramework>net6.0</OlderToolTargetFramework>
7+
<ArtifactsNonShippingBundlesDir>$(ArtifactsDir)bundles\$(Configuration)\NonShipping\</ArtifactsNonShippingBundlesDir>
78
</PropertyGroup>
89
</Project>

eng/PublishProjects.targets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Project>
22

33
<PropertyGroup>
4-
<SharedPublishProjectProperties>SelfContained=false</SharedPublishProjectProperties>
54
<SharedPublishProjectProperties>$(SharedPublishProjectProperties);UseAppHost=true</SharedPublishProjectProperties>
65
<SharedPublishProjectProperties>$(SharedPublishProjectProperties);PackAsTool=false</SharedPublishProjectProperties>
76
</PropertyGroup>

eng/Publishing.props

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<PropertyGroup>
11-
<PublishDependsOnTargets>$(PublishDependsOnTargets);CollectPackageArtifactFiles;CollectVersionArtifactFiles</PublishDependsOnTargets>
11+
<PublishDependsOnTargets>$(PublishDependsOnTargets);CollectPackageArtifactFiles;CollectBundleArtifactFiles;CollectVersionArtifactFiles</PublishDependsOnTargets>
1212
</PropertyGroup>
1313

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

21+
<ItemGroup>
22+
<BundleFile Include="$(ArtifactsNonShippingBundlesDir)*" IsShipping="false" />
23+
</ItemGroup>
24+
2125
<Target Name="CalculateBlobGroupAndBuildVersion">
2226
<PropertyGroup>
2327
<!--
@@ -200,6 +204,20 @@
200204
</ItemGroup>
201205
</Target>
202206

207+
<Target Name="CollectBundleArtifactFiles"
208+
DependsOnTargets="CalculateBlobGroupAndBuildVersion">
209+
<ItemGroup>
210+
<ItemsToPushToBlobFeed Include="@(BundleFile)"
211+
RemoveMetadata="IsShipping"
212+
Condition="'$(_BuildVersion)' != ''">
213+
<!-- Place blobs into versioned container so that stable versions (or lack of version) do not collide. -->
214+
<RelativeBlobPath>diagnostics/monitor/$(_BuildVersion)/%(BundleFile.Filename)%(BundleFile.Extension)</RelativeBlobPath>
215+
<ManifestArtifactData Condition="'%(BundleFile.IsShipping)' != 'true'">NonShipping=true</ManifestArtifactData>
216+
<PublishFlatContainer>true</PublishFlatContainer>
217+
</ItemsToPushToBlobFeed>
218+
</ItemGroup>
219+
</Target>
220+
203221
<Target Name="CollectVersionArtifactFiles"
204222
DependsOnTargets="CalculateBlobGroupAndBuildVersion">
205223
<PropertyGroup>

eng/dependabot/Versions.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
<SwashbuckleAspNetCoreVersion>6.5.0</SwashbuckleAspNetCoreVersion>
2323
<AwsSdkS3Version>3.5.8.1</AwsSdkS3Version>
2424

25+
<!-- Release-branch specific reference -->
26+
<!-- dotnet/diagnostics references -->
27+
<MicrosoftDiagnosticsMonitoringShippedVersion>7.0.430602</MicrosoftDiagnosticsMonitoringShippedVersion>
28+
2529
<!--
2630
Moq version & constants derived from Moq.
2731
The MoqInternalsVisibleTo* properties are not managed by Dependabot and may need to be updated incase a new version of Moq ever changes them.

eng/pipelines/jobs/build-archive.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
-skipmanaged
3737
-skipnative
3838
/p:SkipPublishProjects=true
39+
/p:CreateSingleFileBundles=true
3940
/p:ThirdPartyNoticesFilePath='$(Build.SourcesDirectory)/$(_TPNFile)'
4041
4142
postBuildSteps:
@@ -44,6 +45,12 @@ jobs:
4445
inputs:
4546
SourceFolder: '$(Build.SourcesDirectory)/artifacts/packages'
4647
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages'
48+
49+
- task: CopyFiles@2
50+
displayName: Gather Artifacts (bundles)
51+
inputs:
52+
SourceFolder: '$(Build.SourcesDirectory)/artifacts/bundles'
53+
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bundles'
4754

4855
- task: PublishBuildArtifacts@1
4956
displayName: Publish Artifacts (Unified)

src/Microsoft.Diagnostics.Monitoring.Options/OptionsDisplayStrings.resx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,12 +490,13 @@
490490
<comment>The description provided for the DumpTempFolder parameter on StorageOptions.</comment>
491491
</data>
492492
<data name="ErrorMessage_CredentialsMissing" xml:space="preserve">
493-
<value>The {0} field, {1} field, or {2} field is required.</value>
494-
<comment>Gets the format string for rejecting validation due to 3 missing fields where at least one is required.
495-
3 Format Parameters:
493+
<value>The {0} field, {1} field, {2} field, or {3} field is required.</value>
494+
<comment>Gets the format string for rejecting validation due to 4 missing fields where at least one is required.
495+
4 Format Parameters:
496496
0. fieldNameOne: The name of the first field that is missing
497497
1. fieldNameTwo: The name of the second field that is missing
498-
2. fieldNameThree: The name of the third field that is missing</comment>
498+
2. fieldNameThree: The name of the third field that is missing
499+
3. fieldNameFour: The name of the fourth field that is missing</comment>
499500
</data>
500501
<data name="DisplayAttributeDescription_CollectLogsOptions_Format" xml:space="preserve">
501502
<value>The format of the logs artifact.</value>

src/Microsoft.Diagnostics.Monitoring.StartupHook/Exceptions/CurrentAppDomainExceptionProcessor.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ public void Start()
2424

2525
private static void ConfigurePipeline(ExceptionPipelineBuilder builder)
2626
{
27+
// Process current exception and its inner exceptions
28+
builder.Add(next => new ExceptionDemultiplexerPipelineStep(next).Invoke);
2729
// Prevent rethrows from being evaluated; only care about origination of exceptions.
2830
builder.Add(next => new FilterRepeatExceptionPipelineStep(next).Invoke);
31+
// Report exception through event source
2932
builder.Add(next => new ExceptionEventsPipelineStep(next).Invoke);
3033
}
3134
}

src/Microsoft.Diagnostics.Monitoring.StartupHook/Exceptions/CurrentAppDomainExceptionSource.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public CurrentAppDomainExceptionSource()
2525

2626
private void CurrentDomain_FirstChanceException(object? sender, FirstChanceExceptionEventArgs e)
2727
{
28+
DateTime timestamp = DateTime.UtcNow;
29+
2830
if (_handlingException.Value)
2931
{
3032
// Exception handling is already in progress on this thread. The current exception is likely
@@ -38,7 +40,7 @@ private void CurrentDomain_FirstChanceException(object? sender, FirstChanceExcep
3840
{
3941
_handlingException.Value = true;
4042

41-
RaiseExceptionThrown(e.Exception);
43+
RaiseExceptionThrown(e.Exception, timestamp);
4244
}
4345
catch
4446
{

0 commit comments

Comments
 (0)