Skip to content

[Examples.AspNet] Update Prometheus exporter - #1107

Merged
Kielek merged 8 commits into
open-telemetry:mainfrom
fidelity-contributions:fidelity-20230317-150933
Apr 11, 2023
Merged

[Examples.AspNet] Update Prometheus exporter#1107
Kielek merged 8 commits into
open-telemetry:mainfrom
fidelity-contributions:fidelity-20230317-150933

Conversation

@xyq175com

Copy link
Copy Markdown
Contributor

Examples.AspNet is referencing obsolete OpenTelemetry.Exporter.Prometheus
Fixes #1039

Changes

Update Example.AspNet to use correct reference

…Exporter.Prometheus

Signed-off-by: Xu, Yan <Yan.Xu@fmr.com>
@xyq175com
xyq175com requested a review from a team March 27, 2023 01:44
@linux-foundation-easycla

linux-foundation-easycla Bot commented Mar 27, 2023

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

@codecov

codecov Bot commented Mar 27, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1107 (955bd2a) into main (a50e1cd) will decrease coverage by 0.08%.
The diff coverage is n/a.

❗ Current head 955bd2a differs from pull request most recent head b7d725a. Consider uploading reports for the commit b7d725a to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1107      +/-   ##
==========================================
- Coverage   72.00%   71.93%   -0.08%     
==========================================
  Files         229      229              
  Lines        8438     8445       +7     
==========================================
- Hits         6076     6075       -1     
- Misses       2362     2370       +8     

see 2 files with indirect coverage changes

@xyq175com xyq175com closed this Mar 27, 2023
@xyq175com
xyq175com deleted the fidelity-20230317-150933 branch March 27, 2023 02:28
@xyq175com
xyq175com restored the fidelity-20230317-150933 branch March 27, 2023 02:31
@xyq175com xyq175com reopened this Mar 27, 2023
@Kielek

Kielek commented Mar 27, 2023

Copy link
Copy Markdown
Member

/easycla

@xyq175com

xyq175com commented Mar 27, 2023

Copy link
Copy Markdown
Contributor Author

/easycla

its passed @Kielek

@Kielek Kielek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you tested application after changes?
It should not even compile without additional changes in Global.asax.cs.

@Kielek Kielek changed the title Examples.AspNet is referencing obsolete OpenTelemetry [Examples.AspNet] Update Prometheus exorter Mar 27, 2023
@Kielek Kielek changed the title [Examples.AspNet] Update Prometheus exorter [Examples.AspNet] Update Prometheus exporter Mar 27, 2023
@Kielek Kielek added the dependencies Pull requests that update a dependency file label Mar 27, 2023
@xyq175com

Copy link
Copy Markdown
Contributor Author

Will update shortly

@xyq175com
xyq175com force-pushed the fidelity-20230317-150933 branch from 5e2410e to 955bd2a Compare April 4, 2023 04:37
@xyq175com
xyq175com requested a review from Kielek April 4, 2023 07:14
@xyq175com

Copy link
Copy Markdown
Contributor Author

@Kielek Is there something wrong with the integration test, Same as other PR build, it has been running several hours.

@Kielek

Kielek commented Apr 4, 2023

Copy link
Copy Markdown
Member

We know about issues with Code Coverage step. It is not related to your changes.
It is not a blocker for merging this PR. We need a proof (screen with prometheus page?) that your changes are working fine.

@xyq175com

xyq175com commented Apr 10, 2023

Copy link
Copy Markdown
Contributor Author

Hi @Kielek Do you know how to start the prometheus page? I was testing the build of Examples.AspNet is success and http://localhost:56171/ is started without error
image

@Kielek

Kielek commented Apr 11, 2023

Copy link
Copy Markdown
Member

http://localhost:9464/metrics - based on https://github.com/open-telemetry/opentelemetry-dotnet/blob/core-1.4.0/src/OpenTelemetry.Exporter.Prometheus.HttpListener/PrometheusHttpListenerOptions.cs#L26-L31

# TYPE http_server_duration_ms histogram
# UNIT http_server_duration_ms ms
# HELP http_server_duration_ms Measures the duration of inbound HTTP requests.
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="0"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="5"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="10"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="25"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="50"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="75"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="100"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="250"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="500"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="750"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="1000"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="2500"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="5000"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="7500"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="10000"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="200",le="+Inf"} 1 1681191449615
http_server_duration_ms_sum{http_method="GET",http_scheme="http",http_status_code="200"} 2697.694 1681191449615
http_server_duration_ms_count{http_method="GET",http_scheme="http",http_status_code="200"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="0"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="5"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="10"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="25"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="50"} 0 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="75"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="100"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="250"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="500"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="750"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="1000"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="2500"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="5000"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="7500"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="10000"} 1 1681191449615
http_server_duration_ms_bucket{http_method="GET",http_scheme="http",http_status_code="404",le="+Inf"} 1 1681191449615
http_server_duration_ms_sum{http_method="GET",http_scheme="http",http_status_code="404"} 69.78 1681191449615
http_server_duration_ms_count{http_method="GET",http_scheme="http",http_status_code="404"} 1 1681191449615

# EOF

but I have to apply following changes (I cannot push changes to you branch due to protection settings)

diff --git a/examples/AspNet/Views/Web.config b/examples/AspNet/Views/Web.config
index 6e67a6c..cfaf848 100644
--- a/examples/AspNet/Views/Web.config
+++ b/examples/AspNet/Views/Web.config
@@ -9,7 +9,7 @@
   </configSections>

   <system.web.webPages.razor>
-    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
     <pages pageBaseType="System.Web.Mvc.WebViewPage">
       <namespaces>
         <add namespace="System.Web.Mvc" />
@@ -34,7 +34,7 @@
   <system.web>
     <compilation>
       <assemblies>
-        <add assembly="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
+        <add assembly="System.Web.Mvc, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
         <add assembly="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" />
       </assemblies>
     </compilation>

@xyq175com

Copy link
Copy Markdown
Contributor Author

@Kielek I thought that was just my local change to make it build without error, I have pushed the change to branch. Can you check again? thank you.

@Kielek
Kielek merged commit 5907573 into open-telemetry:main Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Examples.AspNet is referencing obsolete OpenTelemetry.Exporter.Prometheus

2 participants