Monitoring multi-process Python apps with Prometheus
Recently I run into a problem with collecting metrics from python app running in muliple processes (using uvicorn). When you have these multi-process applications, any of the multiple workers-processes can respond to prometheus’s scraping request. Each worker then responds with a value for a metric that it knows of.
Pydantic, preventing type coercion in Union type
I faced with the problem with type coercion in Union
when resulting type depends on the order of types in annotation:
Pydantic, two-way mapping
With Pydantic we can build full-fledged two-way mapping using aliases
and allow_population_by_field_name
setting in Config
Using pip-tools for multiple environments
For couple of years I’ve been using pip-tools for managing requirements but recently I faced with a problem of splitting requirements for dev and production environments. The problem was that if we just split requirements and compile them separately we will end up with different versions.