| 1 |
# labstack echo instrumentation example |
| 2 |
|
| 3 |
An HTTP server using labstack echo and instrumentation. The server has a |
| 4 |
`/users/:id` endpoint. The server generates span information to |
| 5 |
`stdout`. |
| 6 |
|
| 7 |
These instructions expect you have |
| 8 |
[docker-compose](https://docs.docker.com/compose/) installed. |
| 9 |
|
| 10 |
Bring up the `echo-server` and `echo-client` services to run the |
| 11 |
example: |
| 12 |
|
| 13 |
```sh |
| 14 |
docker-compose up --detach echo-server echo-client |
| 15 |
``` |
| 16 |
|
| 17 |
The `echo-client` service sends just one HTTP request to `echo-server` |
| 18 |
and then exits. View the span generated by `echo-server` in the logs: |
| 19 |
|
| 20 |
```sh |
| 21 |
docker-compose logs echo-server |
| 22 |
``` |
| 23 |
|
| 24 |
Shut down the services when you are finished with the example: |
| 25 |
|
| 26 |
```sh |
| 27 |
docker-compose down |
| 28 |
``` |