Skip to content

Commit 5e7dd40

Browse files
authored
feat/Add in fastapi otel middleware (#20)
1 parent 01fb857 commit 5e7dd40

File tree

12 files changed

+249
-196
lines changed

12 files changed

+249
-196
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 0.0.3
2+
3+
### Features
4+
5+
* **OTEL middleware added**
6+
7+
18
## 0.0.2
29

310
### Enhancements

requirements/cli.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ uvicorn
22
fastapi
33
click
44
unstructured-ingest
5+
opentelemetry-instrumentation-fastapi
6+
opentelemetry-exporter-otlp-proto-grpc

requirements/cli.txt

Lines changed: 95 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -1,213 +1,136 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.11
2+
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
5-
# pip-compile cli.in
5+
# pip-compile requirements//cli.in
66
#
77
annotated-types==0.7.0
88
# via pydantic
99
anyio==4.4.0
10-
# via
11-
# httpx
12-
# starlette
13-
# watchfiles
14-
backoff==2.2.1
15-
# via unstructured
16-
beautifulsoup4==4.12.3
17-
# via unstructured
18-
certifi==2024.7.4
19-
# via
20-
# httpcore
21-
# httpx
22-
# requests
23-
# unstructured-client
24-
chardet==5.2.0
25-
# via unstructured
26-
charset-normalizer==3.3.2
27-
# via
28-
# requests
29-
# unstructured-client
10+
# via starlette
11+
asgiref==3.8.1
12+
# via opentelemetry-instrumentation-asgi
3013
click==8.1.7
3114
# via
32-
# -r cli.in
33-
# nltk
34-
# typer
15+
# -r requirements//cli.in
16+
# unstructured-ingest
3517
# uvicorn
3618
dataclasses-json==0.6.7
37-
# via
38-
# unstructured
39-
# unstructured-client
40-
deepdiff==7.0.1
41-
# via unstructured-client
42-
dnspython==2.6.1
43-
# via email-validator
44-
email-validator==2.2.0
45-
# via fastapi
46-
emoji==2.12.1
47-
# via unstructured
48-
fastapi==0.111.1
49-
# via -r cli.in
50-
fastapi-cli==0.0.4
51-
# via fastapi
52-
filetype==1.2.0
53-
# via unstructured
19+
# via unstructured-ingest
20+
deprecated==1.2.14
21+
# via
22+
# opentelemetry-api
23+
# opentelemetry-exporter-otlp-proto-grpc
24+
# opentelemetry-semantic-conventions
25+
exceptiongroup==1.2.2
26+
# via anyio
27+
fastapi==0.112.2
28+
# via -r requirements//cli.in
29+
googleapis-common-protos==1.65.0
30+
# via opentelemetry-exporter-otlp-proto-grpc
31+
grpcio==1.66.0
32+
# via opentelemetry-exporter-otlp-proto-grpc
5433
h11==0.14.0
55-
# via
56-
# httpcore
57-
# uvicorn
58-
httpcore==1.0.5
59-
# via httpx
60-
httptools==0.6.1
6134
# via uvicorn
62-
httpx==0.27.0
63-
# via
64-
# fastapi
65-
# unstructured-client
66-
idna==3.7
67-
# via
68-
# anyio
69-
# email-validator
70-
# httpx
71-
# requests
72-
# unstructured-client
73-
jinja2==3.1.4
74-
# via fastapi
75-
joblib==1.4.2
76-
# via nltk
77-
jsonpath-python==1.0.6
78-
# via unstructured-client
79-
langdetect==1.0.9
80-
# via unstructured
81-
lxml==5.2.2
82-
# via unstructured
83-
markdown-it-py==3.0.0
84-
# via rich
85-
markupsafe==2.1.5
86-
# via jinja2
87-
marshmallow==3.21.3
88-
# via
89-
# dataclasses-json
90-
# unstructured-client
91-
mdurl==0.1.2
92-
# via markdown-it-py
35+
idna==3.8
36+
# via anyio
37+
importlib-metadata==8.0.0
38+
# via opentelemetry-api
39+
marshmallow==3.22.0
40+
# via dataclasses-json
9341
mypy-extensions==1.0.0
42+
# via typing-inspect
43+
numpy==2.1.0
44+
# via pandas
45+
opentelemetry-api==1.26.0
46+
# via
47+
# opentelemetry-exporter-otlp-proto-grpc
48+
# opentelemetry-instrumentation
49+
# opentelemetry-instrumentation-asgi
50+
# opentelemetry-instrumentation-fastapi
51+
# opentelemetry-sdk
52+
# opentelemetry-semantic-conventions
53+
opentelemetry-exporter-otlp-proto-common==1.26.0
54+
# via opentelemetry-exporter-otlp-proto-grpc
55+
opentelemetry-exporter-otlp-proto-grpc==1.26.0
56+
# via -r requirements//cli.in
57+
opentelemetry-instrumentation==0.47b0
58+
# via
59+
# opentelemetry-instrumentation-asgi
60+
# opentelemetry-instrumentation-fastapi
61+
opentelemetry-instrumentation-asgi==0.47b0
62+
# via opentelemetry-instrumentation-fastapi
63+
opentelemetry-instrumentation-fastapi==0.47b0
64+
# via -r requirements//cli.in
65+
opentelemetry-proto==1.26.0
66+
# via
67+
# opentelemetry-exporter-otlp-proto-common
68+
# opentelemetry-exporter-otlp-proto-grpc
69+
opentelemetry-sdk==1.26.0
70+
# via
71+
# opentelemetry-exporter-otlp-proto-grpc
72+
# unstructured-ingest
73+
opentelemetry-semantic-conventions==0.47b0
9474
# via
95-
# typing-inspect
96-
# unstructured-client
97-
nest-asyncio==1.6.0
98-
# via unstructured-client
99-
nltk==3.8.1
100-
# via unstructured
101-
numpy==1.26.4
75+
# opentelemetry-instrumentation-asgi
76+
# opentelemetry-instrumentation-fastapi
77+
# opentelemetry-sdk
78+
opentelemetry-util-http==0.47b0
10279
# via
103-
# pandas
104-
# unstructured
105-
ordered-set==4.1.0
106-
# via deepdiff
80+
# opentelemetry-instrumentation-asgi
81+
# opentelemetry-instrumentation-fastapi
10782
packaging==24.1
108-
# via
109-
# marshmallow
110-
# unstructured-client
83+
# via marshmallow
11184
pandas==2.2.2
11285
# via unstructured-ingest
113-
psutil==6.0.0
114-
# via unstructured
86+
protobuf==4.25.4
87+
# via
88+
# googleapis-common-protos
89+
# opentelemetry-proto
11590
pydantic==2.8.2
116-
# via fastapi
91+
# via
92+
# fastapi
93+
# unstructured-ingest
11794
pydantic-core==2.20.1
11895
# via pydantic
119-
pygments==2.18.0
120-
# via rich
121-
pypdf==4.3.1
122-
# via unstructured-client
12396
python-dateutil==2.9.0.post0
12497
# via
12598
# pandas
126-
# unstructured-client
12799
# unstructured-ingest
128-
python-dotenv==1.0.1
129-
# via uvicorn
130-
python-iso639==2024.4.27
131-
# via unstructured
132-
python-magic==0.4.27
133-
# via unstructured
134-
python-multipart==0.0.9
135-
# via fastapi
136100
pytz==2024.1
137101
# via pandas
138-
pyyaml==6.0.1
139-
# via uvicorn
140-
rapidfuzz==3.9.5
141-
# via unstructured
142-
regex==2024.7.24
143-
# via nltk
144-
requests==2.32.3
145-
# via
146-
# requests-toolbelt
147-
# unstructured
148-
# unstructured-client
149-
requests-toolbelt==1.0.0
150-
# via unstructured-client
151-
rich==13.7.1
152-
# via typer
153-
shellingham==1.5.4
154-
# via typer
155102
six==1.16.0
156-
# via
157-
# langdetect
158-
# python-dateutil
159-
# unstructured-client
103+
# via python-dateutil
160104
sniffio==1.3.1
161-
# via
162-
# anyio
163-
# httpx
164-
soupsieve==2.5
165-
# via beautifulsoup4
166-
starlette==0.37.2
105+
# via anyio
106+
starlette==0.38.2
167107
# via fastapi
168-
tabulate==0.9.0
169-
# via unstructured
170-
tqdm==4.66.4
171-
# via
172-
# nltk
173-
# unstructured
174-
typer==0.12.3
175-
# via fastapi-cli
108+
tqdm==4.66.5
109+
# via unstructured-ingest
176110
typing-extensions==4.12.2
177111
# via
178-
# emoji
112+
# anyio
113+
# asgiref
179114
# fastapi
115+
# opentelemetry-sdk
180116
# pydantic
181117
# pydantic-core
182-
# typer
183118
# typing-inspect
184-
# unstructured
185-
# unstructured-client
119+
# uvicorn
186120
typing-inspect==0.9.0
187-
# via
188-
# dataclasses-json
189-
# unstructured-client
121+
# via dataclasses-json
190122
tzdata==2024.1
191123
# via pandas
192-
unstructured==0.15.0
193-
# via unstructured-ingest
194-
unstructured-client==0.25.0
195-
# via unstructured
196-
unstructured-ingest==0.0.0
197-
# via -r cli.in
198-
urllib3==2.2.2
199-
# via
200-
# requests
201-
# unstructured-client
202-
uvicorn[standard]==0.30.3
203-
# via
204-
# -r cli.in
205-
# fastapi
206-
uvloop==0.19.0
207-
# via uvicorn
208-
watchfiles==0.22.0
209-
# via uvicorn
210-
websockets==12.0
211-
# via uvicorn
124+
unstructured-ingest==0.0.8
125+
# via -r requirements//cli.in
126+
uvicorn==0.30.6
127+
# via -r requirements//cli.in
212128
wrapt==1.16.0
213-
# via unstructured
129+
# via
130+
# deprecated
131+
# opentelemetry-instrumentation
132+
zipp==3.20.1
133+
# via importlib-metadata
134+
135+
# The following packages are considered to be unsafe in a requirements file:
136+
# setuptools

requirements/constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
unstructured-ingest==0.0.0
1+
unstructured-ingest==0.0.8

requirements/lint.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
#
77
autoflake==2.3.1
88
# via -r requirements//lint.in
9-
black==24.4.2
9+
black==24.8.0
1010
# via -r requirements//lint.in
1111
click==8.1.7
1212
# via black
13-
flake8==7.1.0
13+
flake8==7.1.1
1414
# via
1515
# -r requirements//lint.in
1616
# flake8-print
1717
flake8-print==5.0.0
1818
# via -r requirements//lint.in
1919
mccabe==0.7.0
2020
# via flake8
21-
mypy==1.10.1
21+
mypy==1.11.2
2222
# via -r requirements//lint.in
2323
mypy-extensions==1.0.0
2424
# via
@@ -30,15 +30,15 @@ pathspec==0.12.1
3030
# via black
3131
platformdirs==4.2.2
3232
# via black
33-
pycodestyle==2.12.0
33+
pycodestyle==2.12.1
3434
# via
3535
# flake8
3636
# flake8-print
3737
pyflakes==3.2.0
3838
# via
3939
# autoflake
4040
# flake8
41-
ruff==0.5.0
41+
ruff==0.6.2
4242
# via -r requirements//lint.in
4343
tomli==2.0.1
4444
# via

0 commit comments

Comments
 (0)