Skip to content

Commit

Permalink
124 Metrics init
Browse files Browse the repository at this point in the history
  • Loading branch information
ChromaticPanic committed Sep 20, 2024
1 parent 6fbb164 commit 5b3cfb7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"stkb.rewrap"
]
}
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"remoteUser": "root"
}
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from quart_cors import cors
from collections import namedtuple
from cryptography.fernet import Fernet
from opentelemetry.instrumentation.asgi import OpenTelemetryMiddleware

load_dotenv() # noqa: E402

Expand Down Expand Up @@ -133,6 +134,7 @@ class MaxContentLengthWarning(APIWarnings):
app = Quart(__name__)
app = cors(app, allow_origin="*", allow_methods=["GET", "POST", "OPTIONS"])
app.config["MAX_CONTENT_LENGTH"] = MAX_CONTENT_LENGTH_MEGABYTES * 1024 * 1024
app.asgi_app = OpenTelemetryMiddleware(app.asgi_app)


@app.before_serving
Expand Down Expand Up @@ -425,7 +427,7 @@ async def get_picture():
try:
data = await request.get_json()
container_name = data.get("container_name")
user_id = container_name
user_id = data.get("user_id")
picture_id = data.get("picture_id")

if user_id and picture_id:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ cryptography
pyyaml
pydantic
python-magic
opentelemetry-instrumentation-asgi
nachet-datastore @git+https://github.com/ai-cfia/ailab-datastore.git@main

0 comments on commit 5b3cfb7

Please sign in to comment.