Skip to content

Commit

Permalink
Merge branch 'main' into vibankwa/add-params-aspnetcorebenchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishwesh Bankwar committed Sep 22, 2022
2 parents 136aa87 + 3158d38 commit 78fc1c6
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 50 deletions.
6 changes: 0 additions & 6 deletions OpenTelemetry.sln
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Tests.Stress.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApp.AspNetCore", "test\TestApp.AspNetCore\TestApp.AspNetCore.csproj", "{5FDAF679-DE5A-4C73-A49B-8ABCF2399229}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry.Exporter.Prometheus.Tests", "test\OpenTelemetry.Exporter.Prometheus.Tests\OpenTelemetry.Exporter.Prometheus.Tests.csproj", "{48509CA5-5CCA-42A5-9B77-3FDA63885C0A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -508,10 +506,6 @@ Global
{5FDAF679-DE5A-4C73-A49B-8ABCF2399229}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FDAF679-DE5A-4C73-A49B-8ABCF2399229}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FDAF679-DE5A-4C73-A49B-8ABCF2399229}.Release|Any CPU.Build.0 = Release|Any CPU
{48509CA5-5CCA-42A5-9B77-3FDA63885C0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{48509CA5-5CCA-42A5-9B77-3FDA63885C0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{48509CA5-5CCA-42A5-9B77-3FDA63885C0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{48509CA5-5CCA-42A5-9B77-3FDA63885C0A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<Description>ASP.NET Core middleware for hosting OpenTelemetry .NET Prometheus Exporter</Description>
<PackageTags>$(PackageTags);prometheus;metrics</PackageTags>
<MinVerTagPrefix>core-</MinVerTagPrefix>
<DefineConstants>$(DefineConstants);PROMETHEUS_ASPNETCORE</DefineConstants>
</PropertyGroup>

<!--Do not run ApiCompat as this package has never released a stable version.
Expand Down
2 changes: 1 addition & 1 deletion src/OpenTelemetry/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

[assembly: InternalsVisibleTo("OpenTelemetry.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.InMemory" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Prometheus.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.EventSource" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Prometheus.Shared" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Prometheus.AspNetCore" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Prometheus.HttpListener" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Exporter.Prometheus.HttpListener.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.Hosting.Tests" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("OpenTelemetry.Extensions.Serilog" + AssemblyInfo.PublicKey)]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2" + AssemblyInfo.MoqPublicKey)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Description>Unit test project for Prometheus Exporter AspNetCore for OpenTelemetry</Description>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<TargetFrameworks>net6.0</TargetFrameworks>
<DefineConstants>$(DefineConstants);PROMETHEUS_ASPNETCORE</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand All @@ -27,6 +28,12 @@
</ItemGroup>

<ItemGroup>
<Compile Include="$(RepoRoot)\test\OpenTelemetry.Exporter.Prometheus.HttpListener.Tests\EventSourceTest.cs" Link="Includes\EventSourceTest.cs" />
<Compile Include="$(RepoRoot)\test\OpenTelemetry.Exporter.Prometheus.HttpListener.Tests\PrometheusCollectionManagerTests.cs" Link="Includes\PrometheusCollectionManagerTests.cs" />
<Compile Include="$(RepoRoot)\test\OpenTelemetry.Exporter.Prometheus.HttpListener.Tests\PrometheusSerializerTests.cs" Link="Includes\PrometheusSerializerTests.cs" />

<Compile Include="$(RepoRoot)\test\OpenTelemetry.Tests\Shared\EventSourceTestHelper.cs" Link="Includes\EventSourceTestHelper.cs" />
<Compile Include="$(RepoRoot)\test\OpenTelemetry.Tests\Shared\TestEventListener.cs" Link="Includes\TestEventListener.cs" />
<Compile Include="$(RepoRoot)\test\OpenTelemetry.Tests\Shared\Utils.cs" Link="Includes\Utils.cs" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<PropertyGroup>
<Description>Unit test project for Prometheus Exporter HttpListener for OpenTelemetry</Description>
<!-- OmniSharp/VS Code requires TargetFrameworks to be in descending order for IntelliSense and analysis. -->
<TargetFrameworks>net462</TargetFrameworks>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<DefineConstants>$(DefineConstants);PROMETHEUS_HTTP_LISTENER</DefineConstants>
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,6 +23,8 @@
</ItemGroup>

<ItemGroup>
<Compile Include="$(RepoRoot)\test\OpenTelemetry.Tests\Shared\EventSourceTestHelper.cs" Link="Includes\EventSourceTestHelper.cs" />
<Compile Include="$(RepoRoot)\test\OpenTelemetry.Tests\Shared\TestEventListener.cs" Link="Includes\TestEventListener.cs" />
<Compile Include="$(RepoRoot)\test\OpenTelemetry.Tests\Shared\Utils.cs" Link="Includes\Utils.cs" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ namespace OpenTelemetry.Exporter.Prometheus.Tests
{
public sealed class PrometheusCollectionManagerTests
{
#if NETFRAMEWORK
[Fact(Skip = "Might be flaky. Might be a bug. See: https://github.com/open-telemetry/opentelemetry-dotnet/pull/3618#issuecomment-1232200946")]
#if PROMETHEUS_HTTP_LISTENER
[Fact(Skip = "Might be flaky. Might be a bug. See: https://github.com/open-telemetry/opentelemetry-dotnet/issues/3679")]
#else
[Fact]
#endif
Expand All @@ -40,9 +40,9 @@ public async Task EnterExitCollectTest()

using (var provider = Sdk.CreateMeterProviderBuilder()
.AddMeter(meter.Name)
#if NETFRAMEWORK
#if PROMETHEUS_HTTP_LISTENER
.AddPrometheusHttpListener()
#else
#elif PROMETHEUS_ASPNETCORE
.AddPrometheusExporter()
#endif
.Build())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
using OpenTelemetry.Metrics;
using Xunit;

namespace OpenTelemetry.Exporter.Prometheus.AspNetCore.Tests;
namespace OpenTelemetry.Exporter.Prometheus.Tests;

public sealed class PrometheusHttpListenerMeterProviderBuilderExtensionsTests
{
Expand Down

This file was deleted.

0 comments on commit 78fc1c6

Please sign in to comment.