Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Prometheus] Remove shared project and move the shared code under listener project #3503

Merged
merged 5 commits into from
Jul 30, 2022

Conversation

Yun-Ting
Copy link
Contributor

@Yun-Ting Yun-Ting commented Jul 28, 2022

Related to:

#3430 (comment)
#3497 (comment)
#3430 (comment)

Changes

Trying out another project setup for prometheus.

Move the files that were previously in OpenTelemetry.Exporter.Prometheus.Shared to be under the OpenTelemetry.Exporter.Prometheus.HttpListener project.
And removed OpenTelemetry.Exporter.Prometheus.Shared project and its corresponding test project.

OpenTelemetry.Exporter.Prometheus.AspNetCore now reference the shared code from the listener project.

For significant contributions please make sure you have completed the following items:

  • Appropriate CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@codecov
Copy link

codecov bot commented Jul 28, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@f21afc8). Click here to learn what that means.
The diff coverage is 75.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3503   +/-   ##
=======================================
  Coverage        ?   86.71%           
=======================================
  Files           ?      275           
  Lines           ?     9970           
  Branches        ?        0           
=======================================
  Hits            ?     8645           
  Misses          ?     1325           
  Partials        ?        0           
Impacted Files Coverage Δ
...rometheusExporterMeterProviderBuilderExtensions.cs 100.00% <ø> (ø)
...metheus.AspNetCore/PrometheusExporterMiddleware.cs 67.85% <ø> (ø)
...orterHttpListenerMeterProviderBuilderExtensions.cs 57.14% <ø> (ø)
....Prometheus.HttpListener/PrometheusHttpListener.cs 81.57% <ø> (ø)
...ometheus.HttpListener/Shared/PrometheusExporter.cs 100.00% <ø> (ø)
...tpListener/Shared/PrometheusExporterEventSource.cs 27.77% <ø> (ø)
...s.HttpListener/Shared/PrometheusExporterOptions.cs 57.14% <ø> (ø)
...etheus.HttpListener/Shared/PrometheusSerializer.cs 78.21% <ø> (ø)
...eus.HttpListener/Shared/PrometheusSerializerExt.cs 100.00% <ø> (ø)
...HttpListener/Shared/PrometheusCollectionManager.cs 80.48% <75.00%> (ø)

@Yun-Ting Yun-Ting marked this pull request as ready for review July 28, 2022 23:45
@Yun-Ting Yun-Ting requested a review from a team July 28, 2022 23:45
<Compile Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Prometheus.Shared\PrometheusExporterOptions.cs" Link="Includes/PrometheusExporterOptions.cs" />
<Compile Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Prometheus.Shared\PrometheusSerializer.cs" Link="Includes/PrometheusSerializer.cs" />
<Compile Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Prometheus.Shared\PrometheusSerializerExt.cs" Link="Includes/PrometheusSerializerExt.cs" />
<Compile Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Prometheus.HttpListener\PrometheusCollectionManager.cs" Link="Includes/PrometheusCollectionManager.cs" />
Copy link
Member

Choose a reason for hiding this comment

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

Maybe put these files under a folder named Shared or Internal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've moved the shared files between AspNetCore and the HttpListener projects that reside in the OpenTelemetry.Exporter.Prometheus.HttpListener project to a folder called Shared. And from the AspNetCore project, grouped the referenced shared files in the Include folder.

@reyang
Copy link
Member

reyang commented Jul 29, 2022

Are the shared code actually removed from OpenTelemetry.Exporter.Prometheus.Shared by this PR?

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

Approving given it is better than the current layout. I think the public class under shared folder is something that should be fixed in the next PR.

@Yun-Ting
Copy link
Contributor Author

Are the shared code actually removed from OpenTelemetry.Exporter.Prometheus.Shared by this PR?

It is now :-)

@utpilla utpilla merged commit 084244c into open-telemetry:main Jul 30, 2022
@Yun-Ting Yun-Ting deleted the yunl/prometheusProjectSetup branch August 1, 2022 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants