Skip to content

Commit

Permalink
requirements fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pgaetani committed Feb 16, 2024
1 parent 46a0bf1 commit 4716f7e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 89 deletions.
18 changes: 0 additions & 18 deletions application.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
from app.performance import init_performance_monitoring
from opencensus.ext.azure.trace_exporter import AzureExporter
from opencensus.ext.flask.flask_middleware import FlaskMiddleware
from opencensus.trace.samplers import ProbabilitySampler

init_performance_monitoring()

from flask import Flask # noqa
from app import create_app # noqa

application = Flask("app")


def callback_function(envelope):
envelope.tags['ai.cloud.role'] = 'admin'


azure_exporter = AzureExporter()
azure_exporter.add_telemetry_processor(callback_function)

FlaskMiddleware(
application,
exporter=azure_exporter,
sampler=ProbabilitySampler(rate=1.0),
)

create_app(application)
5 changes: 1 addition & 4 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,4 @@ govuk-frontend-jinja @ git+https://github.com/Worth-NL/govuk-frontend-jinja.git@
prometheus-client==0.15.0
git+https://github.com/alphagov/gds_metrics_python.git@6f1840a57b6fb1ee40b7e84f2f18ec229de8aa72

sentry-sdk[flask]>=1.0.0,<2.0.0

opencensus-ext-azure
opencensus-ext-flask
sentry-sdk[flask]>=1.0.0,<2.0.0
74 changes: 7 additions & 67 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ awscli==1.29.5
# via awscli-cwlogs
awscli-cwlogs==1.4.6
# via -r requirements.in
azure-core==1.29.3
# via
# azure-identity
# opencensus-ext-azure
azure-identity==1.14.0
# via opencensus-ext-azure
blinker==1.5
# via
# -r requirements.in
Expand All @@ -31,9 +25,7 @@ botocore==1.31.5
# boto3
# s3transfer
cachetools==5.2.0
# via
# google-auth
# notifications-utils
# via notifications-utils
certifi==2023.7.22
# via
# pyproj
Expand All @@ -50,11 +42,7 @@ click==8.1.3
colorama==0.4.4
# via awscli
cryptography==39.0.1
# via
# azure-identity
# fido2
# msal
# pyjwt
# via fido2
dnspython==2.2.1
# via eventlet
docopt==0.6.2
Expand All @@ -75,7 +63,6 @@ flask==2.2.5
# flask-wtf
# gds-metrics
# notifications-utils
# opencensus-ext-flask
# sentry-sdk
flask-login==0.6.2
# via -r requirements.in
Expand All @@ -87,12 +74,6 @@ gds-metrics @ git+https://github.com/alphagov/gds_metrics_python.git@6f1840a57b6
# via -r requirements.in
geojson==2.5.0
# via notifications-utils
google-api-core==2.11.1
# via opencensus
google-auth==2.22.0
# via google-api-core
googleapis-common-protos==1.60.0
# via google-api-core
govuk-bank-holidays==0.11
# via
# -r requirements.in
Expand Down Expand Up @@ -140,26 +121,10 @@ markupsafe==2.1.1
# wtforms
mistune==0.8.4
# via notifications-utils
msal==1.23.0
# via
# azure-identity
# msal-extensions
msal-extensions==1.0.0
# via azure-identity
notifications-python-client==8.0.1
# via -r requirements.in
notifications-utils @ git+https://github.com/Worth-NL/notifications-utils.git@66.0.0f
# via -r requirements.in
opencensus==0.11.2
# via
# opencensus-ext-azure
# opencensus-ext-flask
opencensus-context==0.1.3
# via opencensus
opencensus-ext-azure==1.1.9
# via -r requirements.in
opencensus-ext-flask==0.8.2
# via -r requirements.in
openpyxl==3.0.10
# via pyexcel-xlsx
orderedset==2.0.3
Expand All @@ -170,24 +135,12 @@ phonenumbers==8.13.18
# via notifications-utils
pillow==9.3.0
# via -r requirements.in
portalocker==2.7.0
# via msal-extensions
prometheus-client==0.15.0
# via
# -r requirements.in
# gds-metrics
protobuf==4.24.1
# via
# google-api-core
# googleapis-common-protos
psutil==5.9.5
# via opencensus-ext-azure
pyasn1==0.4.8
# via
# pyasn1-modules
# rsa
pyasn1-modules==0.3.0
# via google-auth
# via rsa
pycparser==2.21
# via cffi
pyexcel==0.7.0
Expand All @@ -207,10 +160,8 @@ pyexcel-xls==0.7.0
# via -r requirements.in
pyexcel-xlsx==0.6.0
# via -r requirements.in
pyjwt[crypto]==2.4.0
# via
# msal
# notifications-python-client
pyjwt==2.4.0
# via notifications-python-client
pypdf==3.13.0
# via notifications-utils
pyproj==3.4.1
Expand All @@ -234,17 +185,11 @@ redis==4.5.4
requests==2.31.0
# via
# awscli-cwlogs
# azure-core
# google-api-core
# govuk-bank-holidays
# msal
# notifications-python-client
# notifications-utils
# opencensus-ext-azure
rsa==4.7.2
# via
# awscli
# google-auth
# via awscli
rtreelib==0.2.0
# via -r requirements.in
s3transfer==0.6.0
Expand All @@ -260,9 +205,7 @@ shapely==1.8.4
six==1.16.0
# via
# awscli-cwlogs
# azure-core
# eventlet
# google-auth
# python-dateutil
smartypants==2.0.1
# via notifications-utils
Expand All @@ -271,13 +214,10 @@ statsd==3.3.0
texttable==1.6.4
# via pyexcel
typing-extensions==4.7.1
# via
# azure-core
# pypdf
# via pypdf
urllib3==1.26.15
# via
# botocore
# google-auth
# requests
# sentry-sdk
werkzeug==2.2.3
Expand Down

0 comments on commit 4716f7e

Please sign in to comment.