Mailing List Archive

Need help with correlating HTTP request with a database call
Hello everyone,
I'm currently working on a project where Apache server is being used with a
database. I need to find out which HTTP request maps to which database call
without modifying the server code(eg., Logs). I read the documentation
regarding logging and the parameters don't seem to be of any help in this
case. So is there any other way in which we can do this

Thank you
Re: Need help with correlating HTTP request with a database call [ In reply to ]
httpd is not privy to the database layer of your application; you will need
to focus on isolating the correlation conditions first, i.e. the request
uri path, the date/time of the request, the HTTP method (GET, POST).

On Tue, Jul 4, 2023 at 1:52?PM Sudesh Gowda J <sudeshgowda02@gmail.com>
wrote:

> Hello everyone,
> I'm currently working on a project where Apache server is being used with
> a database. I need to find out which HTTP request maps to which database
> call without modifying the server code(eg., Logs). I read the documentation
> regarding logging and the parameters don't seem to be of any help in this
> case. So is there any other way in which we can do this
>
> Thank you
>
>
>
Re: Need help with correlating HTTP request with a database call [ In reply to ]
On Tuesday 04 July 2023 at 18:52:10, Sudesh Gowda J wrote:

> I'm currently working on a project where Apache server is being used with a
> database. I need to find out which HTTP request maps to which database call
> without modifying the server code(eg., Logs). I read the documentation
> regarding logging and the parameters don't seem to be of any help in this
> case. So is there any other way in which we can do this

I would have thought the simplest way is to look at the code running on the
server (no need to modify it, just read it) and work out what it does in the
database for any given type of request.

What language is the server code written in?


Antony.

--
#define SIX 1+5
#define NINE 8+1

int main() {
printf("%d\n", SIX * NINE);
}
- thanks to ECB for bringing this to my attention

Please reply to the list;
please *don't* CC me.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Need help with correlating HTTP request with a database call [ In reply to ]
El mar, 4 jul 2023 a las 20:00, Antony Stone (<
Antony.Stone@apache.open.source.it>) escribió:

> On Tuesday 04 July 2023 at 18:52:10, Sudesh Gowda J wrote:
>
> > I'm currently working on a project where Apache server is being used
> with a
> > database. I need to find out which HTTP request maps to which database
> call
> > without modifying the server code(eg., Logs).


Perhaps this is the best way.

Surely you could identify those requests with some specific request header
and the best way to get those is to print them in the logs, as you can
print any request header that comes with the request.

In any case you don't have to change your actual log, CustomLog can be
defined several times with different formats if needed and you will get a
different log from each CustomLog directive (just make sure to change the
name of the log).
So you can have your usual log and add another format and log to capture
those you want to focus related to the database you mention.

Cheers

--
Daniel Ferradal
HTTPD Project
#httpd help at Libera.Chat