Skip to content

Commit 19ba80a

Browse files
committed
Adds information about client configuration for http-dumps and xhprof
fixes #4
1 parent 953cb50 commit 19ba80a

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

docs/config/http-dumps.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,25 @@ For instance, let's say you have a POST request: `http://[email protected]:800
1313
server will intercept the request and capture all the relevant information. It will then display the
1414
dumped data, allowing you to examine the request details, including the URI segments (`user/3/update` in this example).
1515

16-
![http dumps](https://github.com/buggregator/server/assets/773481/fc823390-b490-4bbb-a787-44471eca9fb6)
16+
![http dumps](https://github.com/buggregator/server/assets/773481/fc823390-b490-4bbb-a787-44471eca9fb6)
17+
18+
## Client configuration
19+
20+
There are several ways to say Buggregator that your request is a dump request:
21+
22+
### Using http auth
23+
24+
Add `http-dump` to the host name, e.g. `http://http-dump@...`
25+
26+
```curl
27+
curl --location 'http://[email protected]:8000?foo=bar'
28+
```
29+
30+
### Using header
31+
32+
Add a header `X-Buggregator-Event` with value `http-dump`
33+
34+
```curl
35+
curl --location 'http://127.0.0.1:8000?foo=bar' \
36+
--header 'X-Buggregator-Event: http-dump'
37+
```

docs/config/xhprof.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,23 @@ configure the profiler.
5151

5252
```dotenv
5353
PROFILER_ENDPOINT=http://[email protected]:8000
54-
PROFILER_APP_NAME=My super app
54+
PROFILER_APP_NAME="My super app"
5555
```
56+
57+
## Client configuration
58+
59+
When integrating with Buggregator, especially if you're developing a custom client, it's essential to understand how to
60+
correctly configure the data transmission. This guide outlines various methods to designate your requests as xhprof
61+
requests
62+
63+
### Using HTTP auth
64+
65+
Add `profiler` to the host name, e.g. `http://profiler@...`
66+
67+
### Using header
68+
69+
Add a header `X-Buggregator-Event` with value `profiler` or just add `X-Profiler-Dump` with any value.
70+
71+
### Special endpoint
72+
73+
You can use special endpoint `/profiler/store` to send data to Buggregator.

0 commit comments

Comments
 (0)