Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature: See incoming requests' details #6062

Open
2 tasks done
JorensM opened this issue Aug 30, 2023 · 9 comments
Open
2 tasks done

🚀 Feature: See incoming requests' details #6062

JorensM opened this issue Aug 30, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@JorensM
Copy link

JorensM commented Aug 30, 2023

🔖 Feature description

My feature request is to be able to see details of incoming requests. Currently there is only vague data available to see - total amount of requests and their time. But I would like to see more details about the requests, particularly origin.

🎤 Pitch

Today I noticed an abnormally large amount of requests had come into my Appwrite app (that hasn't even been published yet and only two people have access to). I wanted to see the details of those requests, but it seems that you can't view detailed information about the incoming requests.

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@eldadfux
Copy link
Member

Interesting suggestion! Do you see more use cases where this would be helpful for you?

@JorensM
Copy link
Author

JorensM commented Aug 31, 2023

@eldadfux In addition to my original pitch, this feature would be very helpful for debugging code by being able to view the request's body and status to see if your own requests are being done correctly. If you were to add response details as well, that would be even more useful because it would let you see if your functions are returning the correct responses.

@stnguyen90
Copy link
Contributor

stnguyen90 commented Aug 31, 2023

@JorensM for now, you can enable HTTP Access Logs in Traefik. This will give you logs like:

<remote_IP_address> - <client_user_name_if_available> [<timestamp>] "<request_method> <request_path> <request_protocol>" <origin_server_HTTP_status> <origin_server_content_size> "<request_referrer>" "<request_user_agent>" <number_of_requests_received_since_Traefik_started> "<Traefik_router_name>" "<Traefik_server_URL>" <request_duration_in_ms>ms

To do so, I highly recommend minimizing changes to Appwrite’s docker-compose.yml file so you can use the recommended upgrade script to upgrade Appwrite. The upgrade script will wipe your tweaks if you customize Appwrite’s docker-compose.yml file. If you, instead, upgrade manually, you can make a mistake while updating some parts of the compose file.

In your docker-compose.override.yml, include:

version: '3'

services:

  traefik:
    command:
      - --accessLog=true
      - --providers.file.directory=/storage/config
      - --providers.file.watch=true
      - --providers.docker=true
      - --providers.docker.exposedByDefault=false
      - --providers.docker.constraints=Label(`traefik.constraint-label-stack`,`appwrite`)
      - --entrypoints.appwrite_web.address=:80
      - --entrypoints.appwrite_websecure.address=:443

Then run docker compose up -d to recreate traefik with this additional config.

@JorensM
Copy link
Author

JorensM commented Sep 1, 2023

@stnguyen90 thanks, but I'm using Appwrite Cloud

@ArsBinarii
Copy link

ArsBinarii commented Sep 26, 2023

I honestly can't believe there is no proper logs I can quickly access, just setup a project locally and the request jumped to 100 then 400 requests no idea why, spent 1h searching the web for the log capabilities of this platform. there is none !!

You can get hacked, abused and you have no idea from where the traffic is coming and what is being requested. still have no idea from where the requests are coming, I will continue with the tutorial I am following but this is a major turn off not being able to view the logs

@ArsBinarii
Copy link

@JorensM did you find any solution to this ?

@JorensM
Copy link
Author

JorensM commented Sep 26, 2023

@RRPRIME Nope. For Appwrite Cloud there doesn't seem to be any HTTP logging capabilities.

As for self hosted, you can check out this comment

@ArsBinarii
Copy link

@JorensM, yeah I applied that ...but is somewhat lacking, I guess with self-hosted you can do a lot about it, I was looking for a cloud deploy at the end...guess I have to either wait. self-host or switch to another platform.

@JorensM
Copy link
Author

JorensM commented Sep 29, 2023

@RRPRIME @eldadfux I would love to work on this issue myself, but I'd have to wait for Cloud to be updated to the new API

EDIT: It appears that Cloud has already been updated, so I'll have a try at this

EDIT 2: Turns out that you need Docker for Appwrite. Unfortunately I can't work with Docker as it fries my computer. So I won't be taking this, sorry.

@stnguyen90 stnguyen90 added enhancement New feature or request and removed feature labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants