Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
ff9341d
implement, add tests
JanProvaznik Jan 10, 2025
9fe19f8
Merge branch 'main' into otel-basic
JanProvaznik Jan 10, 2025
a2f0720
update app.config s
JanProvaznik Jan 10, 2025
96eeeee
Merge branch 'otel-basic' of https://github.com/JanProvaznik/msbuild …
JanProvaznik Jan 10, 2025
49467bb
fix test envvar behavior
JanProvaznik Jan 13, 2025
cdaa52a
apply feedback
JanProvaznik Jan 13, 2025
2c28a87
don't use ConversionUtilities
JanProvaznik Jan 13, 2025
cf089e9
fix: dispose before flushing
JanProvaznik Jan 13, 2025
7b88424
Move telemetry envvar handling to Traits
JanProvaznik Jan 14, 2025
49c429d
downgrade packages, manage lifetime of telemetry in BuildManager
JanProvaznik Jan 14, 2025
c95245c
test what happens in ci with otel
JanProvaznik Jan 14, 2025
9189121
testing in ci
JanProvaznik Jan 15, 2025
9dfb8c9
remove explicit adding source to exporter, wildcard from VS default h…
JanProvaznik Jan 15, 2025
3385704
remove assembly redirect
JanProvaznik Jan 16, 2025
a43acbd
remove binding redirect
JanProvaznik Jan 16, 2025
b2f0601
remove explicit Extensions primitives reference
JanProvaznik Jan 16, 2025
fab67b5
undo binding asyncinterface binding redirect deletion
JanProvaznik Jan 16, 2025
da883a9
reintroduce diagnosticsource redirect
JanProvaznik Jan 16, 2025
1c6a099
nit
JanProvaznik Jan 16, 2025
de12d05
reintroduce extensions binding redirect...
JanProvaznik Jan 16, 2025
a208e67
downgrade diagnosticsource, upgrade VSOTel to VS compatible verison
JanProvaznik Jan 17, 2025
eba5787
downgrade diagnosticsource, privateassets vs otel
JanProvaznik Jan 17, 2025
f05135f
remove Extensions primitives redirect
JanProvaznik Jan 17, 2025
6ef7496
Revert "remove Extensions primitives redirect"
JanProvaznik Jan 17, 2025
06ef018
Merge branch 'main' of https://github.com/dotnet/msbuild into otel-basic
JanProvaznik Jan 17, 2025
9ceb237
Avoid ValueTuple build error
rainersigwald Jan 17, 2025
5fee7a5
Merge branch 'otel-basic' of https://github.com/JanProvaznik/msbuild …
JanProvaznik Jan 20, 2025
e0f9312
reference correct diagnosticsource in version.details.xml
JanProvaznik Jan 20, 2025
735f6e2
include otel in test packages
JanProvaznik Jan 20, 2025
db283b0
mention places that need to upgrade vs version on major release
JanProvaznik Jan 20, 2025
91afbfa
17.14 changewave = optout
JanProvaznik Jan 20, 2025
41a7879
fix logic in GetProperties
JanProvaznik Jan 21, 2025
8c0c825
remove explicit references that are transitively included
JanProvaznik Jan 22, 2025
91643e3
remove vs-impl package source
JanProvaznik Jan 22, 2025
802dfc0
adjust VS package
JanProvaznik Jan 22, 2025
bb72029
move telemetrystate inside the class it's relevant to
JanProvaznik Jan 22, 2025
a1ffd51
Revert "remove vs-impl package source"
JanProvaznik Jan 22, 2025
f4befb6
Merge branch 'main' into otel-basic
JanProvaznik Jan 22, 2025
559f85d
add Otel to dependent assemblies
JanProvaznik Jan 22, 2025
17e7628
add all transitive dependencies to app.amd64.config and ngen
JanProvaznik Jan 23, 2025
6627e02
don't sign OpenTelemetry
JanProvaznik Jan 23, 2025
86fcf77
sign correctly
JanProvaznik Jan 23, 2025
039e929
thirdpartynotices new packages
JanProvaznik Jan 24, 2025
83bdf4f
extensions primitives to swr
JanProvaznik Jan 24, 2025
512ef64
more missing packages in swr
JanProvaznik Jan 24, 2025
da51175
remove otel assemblies from test project
JanProvaznik Jan 27, 2025
bfba539
gracefully handle load errors
JanProvaznik Jan 27, 2025
3789e8b
reintroduce reliable shutdown in standalone, and unreliable longrunning
JanProvaznik Jan 27, 2025
c2d550b
fix tests
JanProvaznik Jan 27, 2025
a5c2ce6
avoid assembly loads when not sampled, add samplerate as a telemetry …
JanProvaznik Jan 29, 2025
b885721
refactor tests
JanProvaznik Jan 30, 2025
e4fe866
disable telemetry by default
JanProvaznik Jan 30, 2025
26203bc
fix tests
JanProvaznik Jan 30, 2025
81664cb
handle envvars correctly in test context
JanProvaznik Jan 31, 2025
9e06c72
reformulate release checklist, needs hashing clarification, lock-free…
JanProvaznik Feb 3, 2025
99f8d0a
Merge branch 'main' into otel-basic
JanProvaznik Feb 3, 2025
d4c024e
format thirdpartynotices
JanProvaznik Feb 4, 2025
21c9d98
separate opt in and override sample rate concepts
JanProvaznik Feb 7, 2025
034c1af
update telemetry version
JanProvaznik Feb 7, 2025
88eaab4
rm accidentally commited file
JanProvaznik Feb 18, 2025
8f54bcf
Merge branch 'main' into otel-basic
JanProvaznik Feb 20, 2025
3d5c9e4
Merge branch 'main' of https://github.com/dotnet/msbuild into otel-basic
JanProvaznik Feb 20, 2025
b16b5c4
fix telemetry version
JanProvaznik Feb 20, 2025
f2c8ea9
remove internal, because it has no effect due to sdk optout
JanProvaznik Feb 20, 2025
3b96e5d
Merge remote-tracking branch 'refs/remotes/origin/otel-basic' into ot…
JanProvaznik Feb 20, 2025
d5f42fb
ungac correct version
JanProvaznik Feb 21, 2025
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
8 changes: 8 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
<add key="dotnet8" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json" />
<add key="dotnet8-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8-transport/nuget/v3/index.json" />
<add key="dotnet9" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet9/nuget/v3/index.json" />
<add key="vs-impl" value="https://pkgs.dev.azure.com/azure-public/vside/_packaging/vs-impl/nuget/v3/index.json" />
Comment thread
JanProvaznik marked this conversation as resolved.

<!-- We don't want other than VS OpenTelemetry libraries from vs-impl -->
<packageSourceMapping>
<packageSource key="vs-impl">
<package pattern="Microsoft.VisualStudio.OpenTelemetry*" />
</packageSource>
</packageSourceMapping>
</packageSources>
<disabledPackageSources>
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
Expand Down
45 changes: 37 additions & 8 deletions THIRDPARTYNOTICES.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MSBuild uses third-party material as listed below. The attached notices are
provided for informational purposes only.
MSBuild uses third-party material as listed below. The attached notices are
provided for informational purposes only.

Notice for LockCheck
Notice for LockCheck
-------------------------------
The MIT License (MIT)

Expand All @@ -27,20 +27,49 @@ SOFTWARE.

-------------------------------

Notice for Samples for xUnit.net
Notice for Samples for xUnit.net
-------------------------------

Copyright (c) .NET Foundation and Contributors
Copyright (c) .NET Foundation and Contributors

All Rights Reserved
All Rights Reserved

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License.
this file except in compliance with the License.

You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License.

-------------------------------

Notice for OpenTelemetry .NET
-------------------------------
MSBuild.exe is distributed with OpenTelemetry .NET binaries.

Copyright (c) OpenTelemetry Authors
Source: https://github.com/open-telemetry/opentelemetry-dotnet

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License.

-------------------------------

Notice for Microsoft.VisualStudio.OpenTelemetry.*
-------------------------------
MSBuild.exe is distributed with Microsoft.VisualStudio.OpenTelemetry.* binaries.

Project: Microsoft.VisualStudio.OpenTelemetry
Copyright: (c) Microsoft Corporation
License: https://visualstudio.microsoft.com/license-terms/mt736442/
6 changes: 6 additions & 0 deletions documentation/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,9 @@ Timing based on the [(Microsoft-internal) release schedule](https://dev.azure.co
git push upstream v{{THIS_RELEASE_VERSION}}.3
```
- [ ] Create Release in Github with `Create Release from Tag` GH option (https://github.com/dotnet/msbuild/releases/new?tag=v17.9.3) - the release notes can be prepopulated (`Generate Release Notes`)

## After release

If v{{NEXT_VERSION}} is a new major version

- [ ] do Major version extra update steps from [release.md](./release.md)
8 changes: 8 additions & 0 deletions documentation/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ As of [#7018](https://github.com/dotnet/msbuild/pull/7018), MSBuild uses a Rosly
3. At release time, we must manually promote the `Unshipped` public API to `Shipped`.

That is a new step in our release process for each formal release (including patch releases if they change API surface).

## Major version extra update steps

Update major version of VS in

- [BuildEnvironmentHelper.cs](../src/Shared/BuildEnvironmentHelper.cs)
- [Constants.cs](../src/Shared/Constants.cs)
- [TelemetryConstants.cs](../src/Framework/Telemetry/TelemetryConstants.cs)
1 change: 1 addition & 0 deletions documentation/wiki/ChangeWaves.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ A wave of features is set to "rotate out" (i.e. become standard functionality) t
### 17.14
- [.SLNX support - use the new parser for .sln and .slnx](https://github.com/dotnet/msbuild/pull/10836)
- [Support custom culture in RAR](https://github.com/dotnet/msbuild/pull/11000)
- [VS Telemetry](https://github.com/dotnet/msbuild/pull/11255)

### 17.12
- [Log TaskParameterEvent for scalar parameters](https://github.com/dotnet/msbuild/pull/9908)
Expand Down
3 changes: 3 additions & 0 deletions eng/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,8 @@
<PackageVersion Include="System.Threading.Channels" Version="$(SystemThreadingChannelsVersion)" />
<PackageVersion Include="System.Threading.Tasks.Dataflow" Version="$(SystemThreadingTasksDataflowVersion)" />
<PackageVersion Include="xunit.console" Version="$(XUnitVersion)" />
<PackageVersion Include="Microsoft.VisualStudio.OpenTelemetry.Collector" Version="$(MicrosoftVisualStudioOpenTelemetryVersion)" />
<PackageVersion Include="Microsoft.VisualStudio.OpenTelemetry.ClientExtensions" Version="$(MicrosoftVisualStudioOpenTelemetryVersion)" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(SystemDiagnosticsDiagnosticSourceVersion)" />
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions eng/Signing.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
<ItemsToSign Include="$(ArtifactsDir)\xsd\Update-MSBuildXsds.ps1" />

<FileSignInfo Include="RuntimeContracts.dll" CertificateName="3PartySHA2" />

<!-- For Telemetry in VS.-->
<FileSignInfo Include="OpenTelemetry.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="OpenTelemetry.Api.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="OpenTelemetry.Api.ProviderBuilderExtensions.dll" CertificateName="3PartySHA2" />
<FileSignInfo Include="Newtonsoft.Json.dll" CertificateName="3PartySHA2" />
</ItemGroup>

<PropertyGroup>
Expand Down
2 changes: 2 additions & 0 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<UsagePattern IdentityGlob="System.Threading.Tasks.Dataflow/*8.0.0*" />
<UsagePattern IdentityGlob="System.Formats.Asn1/*8.0.1*" />
<UsagePattern IdentityGlob="Microsoft.VisualStudio.SolutionPersistence/*1.0.*" />
<!-- Defined in Version.Details.xml - live version used in SB. -->
<UsagePattern IdentityGlob="System.Diagnostics.DiagnosticSource/*8.0.1*" />
</IgnorePatterns>
<Usages>
</Usages>
Expand Down
4 changes: 4 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>2aade6beb02ea367fd97c4070a4198802fe61c03</Sha>
</Dependency>
<Dependency Name="System.Diagnostics.DiagnosticSource" Version="8.0.1">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-runtime</Uri>
<Sha>2d7eea252964e69be94cb9c847b371b23e4dd470</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.25111.5">
Expand Down
2 changes: 2 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@
<SystemTextJsonVersion>8.0.5</SystemTextJsonVersion>
<SystemThreadingChannelsVersion>8.0.0</SystemThreadingChannelsVersion>
<SystemThreadingTasksDataflowVersion>8.0.0</SystemThreadingTasksDataflowVersion>
<SystemDiagnosticsDiagnosticSourceVersion>8.0.1</SystemDiagnosticsDiagnosticSourceVersion>
<MicrosoftVisualStudioOpenTelemetryVersion>0.2.104-beta</MicrosoftVisualStudioOpenTelemetryVersion>
</PropertyGroup>
<!-- Toolset Dependencies -->
<PropertyGroup>
Expand Down
32 changes: 16 additions & 16 deletions src/Build.UnitTests/BackEnd/KnownTelemetry_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ public void BuildTelemetryConstructedHasNoProperties()
{
BuildTelemetry buildTelemetry = new BuildTelemetry();

buildTelemetry.DisplayVersion.ShouldBeNull();
buildTelemetry.BuildEngineDisplayVersion.ShouldBeNull();
buildTelemetry.EventName.ShouldBe("build");
buildTelemetry.FinishedAt.ShouldBeNull();
buildTelemetry.FrameworkName.ShouldBeNull();
buildTelemetry.Host.ShouldBeNull();
buildTelemetry.InitialServerState.ShouldBeNull();
buildTelemetry.BuildEngineFrameworkName.ShouldBeNull();
buildTelemetry.BuildEngineHost.ShouldBeNull();
buildTelemetry.InitialMSBuildServerState.ShouldBeNull();
buildTelemetry.InnerStartAt.ShouldBeNull();
buildTelemetry.Project.ShouldBeNull();
buildTelemetry.ProjectPath.ShouldBeNull();
buildTelemetry.ServerFallbackReason.ShouldBeNull();
buildTelemetry.StartAt.ShouldBeNull();
buildTelemetry.Success.ShouldBeNull();
buildTelemetry.Target.ShouldBeNull();
buildTelemetry.Version.ShouldBeNull();
buildTelemetry.BuildSuccess.ShouldBeNull();
buildTelemetry.BuildTarget.ShouldBeNull();
buildTelemetry.BuildEngineVersion.ShouldBeNull();

buildTelemetry.GetProperties().ShouldBeEmpty();
}
Expand All @@ -61,18 +61,18 @@ public void BuildTelemetryCreateProperProperties()
DateTime innerStartAt = new DateTime(2023, 01, 02, 10, 20, 30);
DateTime finishedAt = new DateTime(2023, 12, 13, 14, 15, 16);

buildTelemetry.DisplayVersion = "Some Display Version";
buildTelemetry.BuildEngineDisplayVersion = "Some Display Version";
buildTelemetry.FinishedAt = finishedAt;
buildTelemetry.FrameworkName = "new .NET";
buildTelemetry.Host = "Host description";
buildTelemetry.InitialServerState = "hot";
buildTelemetry.BuildEngineFrameworkName = "new .NET";
buildTelemetry.BuildEngineHost = "Host description";
buildTelemetry.InitialMSBuildServerState = "hot";
buildTelemetry.InnerStartAt = innerStartAt;
buildTelemetry.Project = @"C:\\dev\\theProject";
buildTelemetry.ProjectPath = @"C:\\dev\\theProject";
buildTelemetry.ServerFallbackReason = "busy";
buildTelemetry.StartAt = startAt;
buildTelemetry.Success = true;
buildTelemetry.Target = "clean";
buildTelemetry.Version = new Version(1, 2, 3, 4);
buildTelemetry.BuildSuccess = true;
buildTelemetry.BuildTarget = "clean";
buildTelemetry.BuildEngineVersion = new Version(1, 2, 3, 4);

var properties = buildTelemetry.GetProperties();

Expand Down
Loading