bricks-cloud / BricksLLM

🔒 Enterprise-grade API gateway that helps you monitor and impose cost or rate limits per API key. Get fine-grained access control and monitoring per user, application, or environment. Supports OpenAI, Azure OpenAI, Anthropic, vLLM, and open-source LLMs.
https://trybricks.ai/
MIT License
863 stars 60 forks source link

both proxy and admin log do not need pass in correlation id explicitly #60

Closed GingerMoon closed 3 months ago

GingerMoon commented 3 months ago

Hi @spikelu2016 , this PR changes all the correlation id log related code, both admin and proxy. Now the sub logger with correlation id is stored inside the http request context. Whenever we can get it from the http request context whenever we need it, especially when we are in some deeper place. In such cases, we need to pass the http request context as the parameter to this "deeper place".

Please feel free to let me know if you have any comments.

spikelu2016 commented 3 months ago

unused cid can still be found across many functions. you can find all of them using vscode search. removing all of them would be great

GingerMoon commented 3 months ago

all cids are removed. the commit is squashed.