Starlette middleware feature requests
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- observability
Research direction
Start by reviewing the existing Starlette middleware entry point and how it currently handles asyncio and route names. Compare the requested route allowlist and request-sampling behavior with the modified middleware described in the issue; done means both options are defined, documented, and covered by tests.
Written by the indexing model from the issue text.
Description
We're using a modified version of the Starlette middleware at the moment, primarily to support asyncio better.
Assuming asyncio support is added in future, there are a couple of other features we've added which it would be nice to see too:
- An optional list of routes to monitor which can be passed in.
- Allows us to monitor the specific endpoints we want without health checks / documentation endpoints etc.
- This can be accomplished manually, but I think being able to set it in config / on the middleware would be a nice addition
- This requires getting the templated route name from the FastAPI router in our case, I think the same applies to Starlette.
- Request sampling
- To reduce the number of events we send, I've added the ability to sample requests
- i.e monitor 50% of requests.
If I've missed a better way / place to implement these, then please let me know.
- Dominant language
- Python
- Stars
- 77
- Forks
- 19
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 5
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scoutapp/scout_apm_python
-
botwork
Difficulty 4/5 3-5 days Newbie friendliness 42/100
scoutapp/scout_apm_python#841 ·
-
botwork
Difficulty 4/5 3-5 days Newbie friendliness 45/100
scoutapp/scout_apm_python#837 ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
scoutapp/scout_apm_python#815 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
scoutapp/scout_apm_python#791 ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
scoutapp/scout_apm_python#789 ·
All issues in scoutapp/scout_apm_python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100