File tree Expand file tree Collapse file tree 6 files changed +15
-4
lines changed Expand file tree Collapse file tree 6 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1+ ## 0.0.82
2+
3+ * Expose Prometheus metrics at /metrics
4+
15## 0.0.81
26
37* Update ` strategy ` parameter to allow ` ' ` and ` " ` as input surrounding the value.
Original file line number Diff line number Diff line change 22from fastapi .datastructures import FormData
33from fastapi .responses import JSONResponse
44from fastapi .security import APIKeyHeader
5+ from prometheus_client import make_asgi_app
56import logging
67import os
78
1314app = FastAPI (
1415 title = "Unstructured Pipeline API" ,
1516 summary = "Partition documents with the Unstructured library" ,
16- version = "0.0.81 " ,
17+ version = "0.0.82 " ,
1718 docs_url = "/general/docs" ,
1819 openapi_url = "/general/openapi.json" ,
1920 servers = [
3132 openapi_tags = [{"name" : "general" }],
3233)
3334
35+ metrics_app = make_asgi_app ()
36+ app .mount ("/metrics" , metrics_app )
37+
3438# Note(austin) - This logger just dumps exceptions
3539# We'd rather handle those below, so disable this in deployments
3640uvicorn_logger = logging .getLogger ("uvicorn.error" )
Original file line number Diff line number Diff line change @@ -653,7 +653,7 @@ def return_content_type(filename: str):
653653
654654
655655@router .get ("/general/v0/general" , include_in_schema = False )
656- @router .get ("/general/v0.0.81 /general" , include_in_schema = False )
656+ @router .get ("/general/v0.0.82 /general" , include_in_schema = False )
657657async def handle_invalid_get_request ():
658658 raise HTTPException (
659659 status_code = status .HTTP_405_METHOD_NOT_ALLOWED , detail = "Only POST requests are supported."
@@ -668,7 +668,7 @@ async def handle_invalid_get_request():
668668 description = "Description" ,
669669 operation_id = "partition_parameters" ,
670670)
671- @router .post ("/general/v0.0.81 /general" , include_in_schema = False )
671+ @router .post ("/general/v0.0.82 /general" , include_in_schema = False )
672672def general_partition (
673673 request : Request ,
674674 # cannot use annotated type here because of a bug described here:
Original file line number Diff line number Diff line change 11name : general
2- version : 0.0.81
2+ version : 0.0.82
Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ backoff
1616pypdf
1717pycryptodome
1818psutil
19+ prometheus_client
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ pillow==10.4.0
244244 # unstructured-pytesseract
245245portalocker==2.10.1
246246 # via iopath
247+ prometheus-client==0.21.0
248+ # via -r requirements/base.in
247249proto-plus==1.24.0
248250 # via
249251 # google-api-core
You can’t perform that action at this time.
0 commit comments