Skip to content

Commit 2e4834a

Browse files
author
Shaul Shnaidman
authored
chore: cleanup the http example (#1369)
* Fixed the http example * Removed local paths from Gemfile * Added puma to Gemfile Sinatra requires a web server to handle requests, installing puma is recommended on their documentation. * Update README.md * puma instead of thin
1 parent a57a6e6 commit 2e4834a

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

examples/http/Gemfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
source "https://rubygems.org"
44

55
gem "faraday", "~> 0.16.1"
6-
gem "opentelemetry-api", path: "../../api"
7-
gem "opentelemetry-common", path: "../../common"
8-
gem "opentelemetry-sdk", path: "../../sdk"
6+
gem "opentelemetry-api"
7+
gem "opentelemetry-common"
8+
gem "opentelemetry-sdk"
99
gem "sinatra", "~> 2.0"
10+
gem "puma"

examples/http/README.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,20 @@ This is a simple example that demonstrates tracing an HTTP request from client t
1010

1111
### Running the example
1212

13-
1. Install gems
14-
* `bundle install`
15-
1. Start the server from the `examples/http` directory
16-
* `./server.rb`
17-
1. In a separate terminal window, run the client to make a single request:
18-
* `./client.rb`
19-
1. You should see console exporter output for both the client and server sessions.
13+
Install gems
14+
```sh
15+
bundle install
16+
```
17+
18+
Start the server
19+
```sh
20+
ruby server.rb
21+
```
22+
23+
In a separate terminal window, run the client to make a single request:
24+
```sh
25+
ruby client.rb
26+
```
27+
28+
You should see console exporter output for both the client and server sessions.
2029

0 commit comments

Comments
 (0)