Skip to content

Commit

Permalink
Merge branch 'main' into alanwest/aspnetcore-routing
Browse files Browse the repository at this point in the history
  • Loading branch information
alanwest committed Oct 24, 2023
2 parents 624f9fa + 637ddcf commit 9b2e211
Show file tree
Hide file tree
Showing 170 changed files with 706 additions and 4,116 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-instrumentation-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
- name: dotnet restore
run: dotnet restore ./build/InstrumentationLibraries.proj -p:RunningDotNetPack=true

- name: Build
- name: dotnet build
run: dotnet build ./build/InstrumentationLibraries.proj --configuration Release --no-restore -p:RunningDotNetPack=true

- name: Test ${{ matrix.version }}
- name: dotnet test
run: dotnet test **/bin/Release/${{ matrix.version }}/OpenTelemetry.Instrumentation*.Tests.dll --framework ${{ matrix.version }} --configuration Release --no-restore --no-build --logger:"console;verbosity=detailed"
4 changes: 2 additions & 2 deletions .github/workflows/package-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-dotnet@v3

- name: Pack
run: dotnet pack --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=false
run: dotnet pack OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=false

build-test-experimental:
runs-on: windows-latest
Expand All @@ -33,4 +33,4 @@ jobs:
uses: actions/setup-dotnet@v3

- name: Pack
run: dotnet pack --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=true
run: dotnet pack OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=true
11 changes: 4 additions & 7 deletions .github/workflows/publish-packages-1.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ jobs:
build-pack:
runs-on: windows-latest

env:
RunningDotNetPack: true

steps:
- uses: actions/checkout@v4
with:
Expand All @@ -29,14 +26,14 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
run: dotnet restore OpenTelemetry.proj
- name: dotnet restore
run: dotnet restore OpenTelemetry.proj -p:RunningDotNetPack=true

- name: dotnet build
run: dotnet build OpenTelemetry.proj --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }}
run: dotnet build OpenTelemetry.proj --configuration Release --no-restore -p:Deterministic=true -p:BuildNumber=${{ github.run_number }} -p:RunningDotNetPack=true

- name: dotnet pack
run: dotnet pack OpenTelemetry.proj --configuration Release --no-build
run: dotnet pack OpenTelemetry.proj --configuration Release --no-build --no-restore

- name: Publish Artifacts
uses: actions/upload-artifact@v3
Expand Down
5 changes: 3 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
3) Since version 3.1.0, the .NET runtime team is holding a high bar for backward compatibility on
Microsoft.Extensions.Logging even during major version bumps, so compatibility is not a concern here.
-->
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0-rc.1.23419.4" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0-rc.2.23479.6" />

<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="[3.1.0,)" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="[3.1.0,)" />
Expand All @@ -38,6 +38,7 @@
<PackageVersion Include="OpenTelemetry.Api.ProviderBuilderExtensions" Version="$(OTelLatestStableVer)" />
<PackageVersion Include="OpenTelemetry.Exporter.InMemory" Version="$(OTelLatestStableVer)" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="$(OTelLatestStableVer)" />
<PackageVersion Include="OpenTelemetry.Extensions.Propagators" Version="$(OTelLatestStableVer)" />
<PackageVersion Include="OpenTracing" Version="[0.12.1,0.13)" />

<!--
Expand All @@ -49,7 +50,7 @@
3) The .NET runtime team provides extra backward compatibility guarantee to System.Diagnostics.DiagnosticSource
even during major version bumps, so compatibility is not a concern here.
-->
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="7.0.2" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="8.0.0-rc.2.23479.6" />

<!-- A conservative version of System.Text.Encodings.Web must be used here since there is no backward compatibility guarantee during major version bumps. -->
<PackageVersion Include="System.Text.Encodings.Web" Version="4.7.2" />
Expand Down
25 changes: 18 additions & 7 deletions OpenTelemetry.proj
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
<Project>
<ItemGroup>
<SolutionProjects Include="**\*.csproj" />

<PackProjects Include="src\**\*.csproj" />
<TestProjects Include="test\**\*.csproj" />

<!-- Not pack SemanticConventions project for now -->
<SolutionProjects Remove="src\OpenTelemetry.SemanticConventions\OpenTelemetry.SemanticConventions.csproj" />
<PackProjects Remove="src\OpenTelemetry.SemanticConventions\OpenTelemetry.SemanticConventions.csproj" />
</ItemGroup>

<!-- Skip building these projects when publish packages workflow runs as these projects need to depend upon instrumentation libraries taking a project reference
instead of package reference on API/SDK-->
<SolutionProjects Remove="examples\**\*.csproj" Condition="'$(RunningDotNetPack)' == 'true'"/>
<SolutionProjects Remove="test\Benchmarks\Benchmarks.csproj" Condition="'$(RunningDotNetPack)' == 'true'"/>

<ItemGroup Condition="'$(RunningDotNetPack)' == 'true'">
<!-- Skip building these projects when publish packages workflow runs as
these projects need to depend upon instrumentation libraries taking a
project reference instead of package reference on API/SDK -->
<SolutionProjects Remove="docs\**\**\*.csproj" />
<SolutionProjects Remove="examples\**\*.csproj" />
<SolutionProjects Remove="@(TestProjects)" />
</ItemGroup>

<Target Name="Build">
<MSBuild Projects="@(SolutionProjects)" Targets="Restore;Build" ContinueOnError="ErrorAndStop" />
<MSBuild Projects="@(SolutionProjects)" Targets="Build" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="Restore">
<MSBuild Projects="@(SolutionProjects)" Targets="Restore" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="VSTest">
<MSBuild Projects="@(TestProjects)" Targets="VSTest" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="Pack">
Expand Down
3 changes: 3 additions & 0 deletions build/Common.prod.props
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@

<!-- Note: This selects the correct PublicApiAnalyzers files based on $(ExposeExperimentalFeatures) -->
<ItemGroup>
<AdditionalFiles Include=".publicApi\Stable\PublicAPI.*.txt" />
<AdditionalFiles Include=".publicApi\Stable\$(TargetFramework)\PublicAPI.*.txt" />
<AdditionalFiles Include=".publicApi\Experimental\PublicAPI.*.txt" Condition="'$(ExposeExperimentalFeatures)' == 'true'" />
<AdditionalFiles Include=".publicApi\Experimental\$(TargetFramework)\PublicAPI.*.txt" Condition="'$(ExposeExperimentalFeatures)' == 'true'" />
<AdditionalFiles Include=".publicApi\PublicAPI.*.txt" />
<AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.*.txt" />
</ItemGroup>

Expand Down
9 changes: 5 additions & 4 deletions build/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<PropertyGroup>
<!-- production TFMs -->
<TargetFrameworksForLibraries>net6.0;netstandard2.0;net462</TargetFrameworksForLibraries>
<TargetFrameworksForLibrariesExtended>net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworksForLibrariesExtended>
<TargetFrameworksForLibraries>net8.0;net6.0;netstandard2.0;net462</TargetFrameworksForLibraries>
<TargetFrameworksForLibrariesExtended>net8.0;net6.0;netstandard2.1;netstandard2.0;net462</TargetFrameworksForLibrariesExtended>
<TargetFrameworksForAspNetCoreInstrumentation>net8.0;net7.0;net6.0;netstandard2.1;netstandard2.0</TargetFrameworksForAspNetCoreInstrumentation>
<TargetFrameworksForGrpcNetClientInstrumentation>net6.0;netstandard2.1;netstandard2.0</TargetFrameworksForGrpcNetClientInstrumentation>
<TargetFrameworksForPrometheusAspNetCore>net6.0</TargetFrameworksForPrometheusAspNetCore>
<TargetFrameworksForGrpcNetClientInstrumentation>net8.0;net6.0;netstandard2.1;netstandard2.0</TargetFrameworksForGrpcNetClientInstrumentation>
<TargetFrameworksForPrometheusAspNetCore>net8.0;net6.0</TargetFrameworksForPrometheusAspNetCore>

<!-- non-production TFMs -->
<TargetFrameworksForAspNetCoreTests>net8.0;net7.0;net6.0</TargetFrameworksForAspNetCoreTests>
Expand All @@ -42,6 +42,7 @@

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions build/InstrumentationLibraries.proj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project>
<ItemGroup>
<SolutionProjects Include="..\**\OpenTelemetry.Instrumentation*.csproj" />
<TestProjects Include="..\test\**\OpenTelemetry.Instrumentation*.csproj" />
</ItemGroup>

<Target Name="Build">
Expand All @@ -10,4 +11,8 @@
<Target Name="Restore">
<MSBuild Projects="@(SolutionProjects)" Targets="Restore" ContinueOnError="ErrorAndStop" />
</Target>

<Target Name="VSTest">
<MSBuild Projects="@(TestProjects)" Targets="VSTest" ContinueOnError="ErrorAndStop" />
</Target>
</Project>
5 changes: 1 addition & 4 deletions docs/logs/getting-started-console/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ You should see the following output:
Hello World!
```

Install the latest version of
[Microsoft.Extensions.Logging](https://www.nuget.org/packages/Microsoft.Extensions.Logging/)
package and
Install the
[OpenTelemetry.Exporter.Console](../../../src/OpenTelemetry.Exporter.Console/README.md)
package:

```sh
dotnet add package Microsoft.Extensions.Logging
dotnet add package OpenTelemetry.Exporter.Console
```

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 9b2e211

Please sign in to comment.