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

Merged
merged 6 commits into from
Nov 21, 2024

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.41%. Comparing base (1b9d1c8) to head (d43293d).
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.41%           
=======================================
  Files         339      343    +4     
  Lines       15416    15456   +40     
  Branches     1702     1702           
=======================================
+ Hits        15171    15211   +40     
  Misses        115      115           
  Partials      130      130           

☔ 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
@cofin cofin force-pushed the prometheus-contrib branch from 9284589 to 7c5662d Compare November 17, 2024 17:44
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.

@cofin cofin force-pushed the prometheus-contrib branch from 7c5662d to 66ac2b3 Compare November 18, 2024 17:07
@cofin cofin force-pushed the prometheus-contrib branch from 66ac2b3 to bc826f9 Compare November 20, 2024 16:29
Copy link

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

@cofin cofin merged commit 44d42e6 into main Nov 21, 2024
26 checks passed
@cofin cofin deleted the prometheus-contrib branch November 21, 2024 16:11
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.

4 participants