From c2bfd19016bc8ec6fedf121d6c421f2c282e229c Mon Sep 17 00:00:00 2001 From: Serge K Date: Wed, 5 Jan 2022 22:24:10 +0700 Subject: [PATCH 1/4] fix: vulnerability in dependency --- Prometheus.Client.AspNetCore.sln | 18 +++++++++--------- .../Prometheus.Client.AspNetCore.csproj | 19 +++---------------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/Prometheus.Client.AspNetCore.sln b/Prometheus.Client.AspNetCore.sln index b7f6088..b9db58f 100644 --- a/Prometheus.Client.AspNetCore.sln +++ b/Prometheus.Client.AspNetCore.sln @@ -5,8 +5,6 @@ VisualStudioVersion = 15.0.26228.4 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D994EEE1-3786-4FDF-8A49-76D8B9819A29}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prometheus.Client.AspNetCore", "src\Prometheus.Client.AspNetCore\Prometheus.Client.AspNetCore.csproj", "{B70120FA-53E2-4290-8DF2-BD3AF7139DCB}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{FA0CD8D2-E9AE-4518-B989-17901C5928B0}" ProjectSection(SolutionItems) = preProject .gitattributes = .gitattributes @@ -28,27 +26,29 @@ EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{D3EB5CE6-053E-4CB3-A828-A987DA33BC3C}" ProjectSection(SolutionItems) = preProject - .github\workflows\branch.yml = .github\workflows\branch.yml + .github\workflows\pr.yml = .github\workflows\pr.yml .github\workflows\master.yml = .github\workflows\master.yml - .github\workflows\production.yml = .github\workflows\production.yml + .github\workflows\prod.yml = .github\workflows\prod.yml EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prometheus.Client.AspNetCore", "src\Prometheus.Client.AspNetCore\Prometheus.Client.AspNetCore.csproj", "{D95D2825-6A97-4E54-B667-FE4B4F328207}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B70120FA-53E2-4290-8DF2-BD3AF7139DCB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B70120FA-53E2-4290-8DF2-BD3AF7139DCB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B70120FA-53E2-4290-8DF2-BD3AF7139DCB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B70120FA-53E2-4290-8DF2-BD3AF7139DCB}.Release|Any CPU.Build.0 = Release|Any CPU + {D95D2825-6A97-4E54-B667-FE4B4F328207}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D95D2825-6A97-4E54-B667-FE4B4F328207}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D95D2825-6A97-4E54-B667-FE4B4F328207}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D95D2825-6A97-4E54-B667-FE4B4F328207}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {B70120FA-53E2-4290-8DF2-BD3AF7139DCB} = {D994EEE1-3786-4FDF-8A49-76D8B9819A29} {D3EB5CE6-053E-4CB3-A828-A987DA33BC3C} = {255858DA-9CD1-49FD-BA65-010985E26F2A} + {D95D2825-6A97-4E54-B667-FE4B4F328207} = {D994EEE1-3786-4FDF-8A49-76D8B9819A29} EndGlobalSection EndGlobal diff --git a/src/Prometheus.Client.AspNetCore/Prometheus.Client.AspNetCore.csproj b/src/Prometheus.Client.AspNetCore/Prometheus.Client.AspNetCore.csproj index 595a681..f20800f 100644 --- a/src/Prometheus.Client.AspNetCore/Prometheus.Client.AspNetCore.csproj +++ b/src/Prometheus.Client.AspNetCore/Prometheus.Client.AspNetCore.csproj @@ -3,35 +3,22 @@ ASP.NET Core middleware for the Prometheus.Client 4.5.0 netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0 - Prometheus.Client.AspNetCore Prometheus.Client.AspNetCore - prometheus;metrics - icon.png - MIT - git https://github.com/prom-client-net/prom-client-aspnetcore true - true - true ../../Prometheus.Client.AspNetCore.snk - true - true - snupkg - - true - false - - + - + + From cd3f3ac7a035b53204ad69b99308183f3cc07b28 Mon Sep 17 00:00:00 2001 From: Serge K Date: Wed, 5 Jan 2022 22:26:09 +0700 Subject: [PATCH 2/4] chore: change project structure --- Prometheus.Client.AspNetCore.sln | 12 ++++++------ .../Prometheus.Client.AspNetCore.csproj | 4 ++-- .../PrometheusExtensions.cs | 0 .../PrometheusOptions.cs | 0 4 files changed, 8 insertions(+), 8 deletions(-) rename src/{Prometheus.Client.AspNetCore => }/Prometheus.Client.AspNetCore.csproj (90%) rename src/{Prometheus.Client.AspNetCore => }/PrometheusExtensions.cs (100%) rename src/{Prometheus.Client.AspNetCore => }/PrometheusOptions.cs (100%) diff --git a/Prometheus.Client.AspNetCore.sln b/Prometheus.Client.AspNetCore.sln index b9db58f..07a4faa 100644 --- a/Prometheus.Client.AspNetCore.sln +++ b/Prometheus.Client.AspNetCore.sln @@ -31,7 +31,7 @@ ProjectSection(SolutionItems) = preProject .github\workflows\prod.yml = .github\workflows\prod.yml EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prometheus.Client.AspNetCore", "src\Prometheus.Client.AspNetCore\Prometheus.Client.AspNetCore.csproj", "{D95D2825-6A97-4E54-B667-FE4B4F328207}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Prometheus.Client.AspNetCore", "src\Prometheus.Client.AspNetCore.csproj", "{9CEA986B-142E-4A8A-87B4-A6C2A5B7106B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -39,16 +39,16 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D95D2825-6A97-4E54-B667-FE4B4F328207}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D95D2825-6A97-4E54-B667-FE4B4F328207}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D95D2825-6A97-4E54-B667-FE4B4F328207}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D95D2825-6A97-4E54-B667-FE4B4F328207}.Release|Any CPU.Build.0 = Release|Any CPU + {9CEA986B-142E-4A8A-87B4-A6C2A5B7106B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9CEA986B-142E-4A8A-87B4-A6C2A5B7106B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9CEA986B-142E-4A8A-87B4-A6C2A5B7106B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9CEA986B-142E-4A8A-87B4-A6C2A5B7106B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {D3EB5CE6-053E-4CB3-A828-A987DA33BC3C} = {255858DA-9CD1-49FD-BA65-010985E26F2A} - {D95D2825-6A97-4E54-B667-FE4B4F328207} = {D994EEE1-3786-4FDF-8A49-76D8B9819A29} + {9CEA986B-142E-4A8A-87B4-A6C2A5B7106B} = {D994EEE1-3786-4FDF-8A49-76D8B9819A29} EndGlobalSection EndGlobal diff --git a/src/Prometheus.Client.AspNetCore/Prometheus.Client.AspNetCore.csproj b/src/Prometheus.Client.AspNetCore.csproj similarity index 90% rename from src/Prometheus.Client.AspNetCore/Prometheus.Client.AspNetCore.csproj rename to src/Prometheus.Client.AspNetCore.csproj index f20800f..0886f74 100644 --- a/src/Prometheus.Client.AspNetCore/Prometheus.Client.AspNetCore.csproj +++ b/src/Prometheus.Client.AspNetCore.csproj @@ -1,7 +1,7 @@ ASP.NET Core middleware for the Prometheus.Client - 4.5.0 + 4.5.1 netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0 Prometheus.Client.AspNetCore https://github.com/prom-client-net/prom-client-aspnetcore @@ -9,7 +9,7 @@ ../../Prometheus.Client.AspNetCore.snk - + diff --git a/src/Prometheus.Client.AspNetCore/PrometheusExtensions.cs b/src/PrometheusExtensions.cs similarity index 100% rename from src/Prometheus.Client.AspNetCore/PrometheusExtensions.cs rename to src/PrometheusExtensions.cs diff --git a/src/Prometheus.Client.AspNetCore/PrometheusOptions.cs b/src/PrometheusOptions.cs similarity index 100% rename from src/Prometheus.Client.AspNetCore/PrometheusOptions.cs rename to src/PrometheusOptions.cs From 8d9bdda043d59086b56eb21c1c20c088763c9ca5 Mon Sep 17 00:00:00 2001 From: Serge K Date: Wed, 5 Jan 2022 22:27:52 +0700 Subject: [PATCH 3/4] chore: update README.md --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1520300..35075ca 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,13 @@ Extension for [Prometheus.Client](https://github.com/prom-client-net/prom-client) +## Installation -#### Installation: ```sh dotnet add package Prometheus.Client.AspNetCore ``` -#### Quik start: + +## Use There are [Examples](https://github.com/prom-client-net/prom-examples/tree/master/Middleware/WebAspNetCore_2.0) @@ -40,6 +41,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF } ``` + ## Contribute Contributions to the package are always welcome! @@ -60,4 +62,3 @@ If you like what I'm accomplishing, feel free to buy me a coffee ## License All contents of this package are licensed under the [MIT license](https://opensource.org/licenses/MIT). - From 7e5c149b4ebdfd22a216158688178a00f45ab1f7 Mon Sep 17 00:00:00 2001 From: Serge K Date: Wed, 5 Jan 2022 22:30:50 +0700 Subject: [PATCH 4/4] fix: link in csproj --- src/Prometheus.Client.AspNetCore.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Prometheus.Client.AspNetCore.csproj b/src/Prometheus.Client.AspNetCore.csproj index 0886f74..5a83949 100644 --- a/src/Prometheus.Client.AspNetCore.csproj +++ b/src/Prometheus.Client.AspNetCore.csproj @@ -6,7 +6,7 @@ Prometheus.Client.AspNetCore https://github.com/prom-client-net/prom-client-aspnetcore true - ../../Prometheus.Client.AspNetCore.snk + ../Prometheus.Client.AspNetCore.snk