Skip to content

Commit

Permalink
Adds information about client configuration for http-dumps and xhprof
Browse files Browse the repository at this point in the history
fixes #4
  • Loading branch information
butschster committed Dec 8, 2023
1 parent 953cb50 commit 19ba80a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 2 deletions.
23 changes: 22 additions & 1 deletion docs/config/http-dumps.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,25 @@ For instance, let's say you have a POST request: `http:https://[email protected]:800
server will intercept the request and capture all the relevant information. It will then display the
dumped data, allowing you to examine the request details, including the URI segments (`user/3/update` in this example).

![http dumps](https://github.com/buggregator/server/assets/773481/fc823390-b490-4bbb-a787-44471eca9fb6)
![http dumps](https://github.com/buggregator/server/assets/773481/fc823390-b490-4bbb-a787-44471eca9fb6)

## Client configuration

There are several ways to say Buggregator that your request is a dump request:

### Using http auth

Add `http-dump` to the host name, e.g. `http:https://http-dump@...`

```curl
curl --location 'http:https://[email protected]:8000?foo=bar'
```

### Using header

Add a header `X-Buggregator-Event` with value `http-dump`

```curl
curl --location 'http:https://127.0.0.1:8000?foo=bar' \
--header 'X-Buggregator-Event: http-dump'
```
20 changes: 19 additions & 1 deletion docs/config/xhprof.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,23 @@ configure the profiler.

```dotenv
PROFILER_ENDPOINT=http:https://[email protected]:8000
PROFILER_APP_NAME=My super app
PROFILER_APP_NAME="My super app"
```

## Client configuration

When integrating with Buggregator, especially if you're developing a custom client, it's essential to understand how to
correctly configure the data transmission. This guide outlines various methods to designate your requests as xhprof
requests

### Using HTTP auth

Add `profiler` to the host name, e.g. `http:https://profiler@...`

### Using header

Add a header `X-Buggregator-Event` with value `profiler` or just add `X-Profiler-Dump` with any value.

### Special endpoint

You can use special endpoint `/profiler/store` to send data to Buggregator.

0 comments on commit 19ba80a

Please sign in to comment.