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

feat: move litestar.contrib.prometheus to litestar.plugins.prometheus #3863

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

cofin
Copy link
Member

@cofin cofin commented Nov 17, 2024

Description

feat: deprecate litestar.contrib.prometheus in favor of the new location of litestar.plugins.prometheus

Closes

@cofin cofin requested review from a team as code owners November 17, 2024 03:01
@github-actions github-actions bot added area/docs This PR involves changes to the documentation size: medium type/feat pr/internal labels Nov 17, 2024
@cofin cofin enabled auto-merge (squash) November 17, 2024 03:05
Copy link

codecov bot commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 99.45355% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.42%. Comparing base (a3631e2) to head (66ac2b3).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
litestar/plugins/prometheus/middleware.py 98.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3863   +/-   ##
=======================================
  Coverage   98.41%   98.42%           
=======================================
  Files         339      343    +4     
  Lines       15371    15411   +40     
  Branches     1694     1694           
=======================================
+ Hits        15128    15168   +40     
  Misses        114      114           
  Partials      129      129           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@cofin cofin changed the title feat: deprecate litestar.contrib.prometheus feat: move litestar.contrib.prometheus to litestar.plugins.prometheus Nov 17, 2024
Copy link
Member

@JacobCoffee JacobCoffee left a comment

Choose a reason for hiding this comment

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

sorry maybe a dumb q - what is the benefit here of moving from contrib to plugins aside from renaming it?

also i feel like this one is a good candidate to move outside of the stdlib into its own package and then we can assign it as an extra

@cofin
Copy link
Member Author

cofin commented Nov 17, 2024

sorry maybe a dumb q - what is the benefit here of moving from contrib to plugins aside from renaming it?

also i feel like this one is a good candidate to move outside of the stdlib into its own package and then we can assign it as an extra

The goal is to get any non-essential core code into a plugin style structure. Right now, we have both litestar.plugins and litestar.contrib and it's contributing to code sprawl and additional maintenance overhead.

Re: the move to an external library I also agree. In fact, I think most (maybe all) of the plugins can ultimately be treated that way. We can do that in steps though.

Copy link

sonarcloud bot commented Nov 18, 2024

Copy link

Documentation preview will be available shortly at https://litestar-org.github.io/litestar-docs-preview/3863

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docs This PR involves changes to the documentation pr/internal size: medium type/feat
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants