-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c1d45e1
commit 26756c1
Showing
3 changed files
with
125 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Step-by-step | ||
|
||
1. Install Dependencies | ||
|
||
```bash | ||
gem install opentelemetry-sdk | ||
opentelemetry-exporter-otlp | ||
opentelemetry-instrumentation-all | ||
``` | ||
|
||
2. Configure OpenTelemetry | ||
|
||
```ruby | ||
require 'opentelemetry/sdk' | ||
require 'opentelemetry/exporter/otlp' | ||
require 'opentelemetry/instrumentation/all' | ||
OpenTelemetry::SDK.configure do |c| | ||
c.use_all() # enables all instrumentation! | ||
end | ||
``` | ||
|
||
3. Start the App | ||
|
||
```bash | ||
export OTEL_SERVICE_NAME=my-service-name | ||
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf | ||
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318" | ||
export OTEL_EXPORTER_OTLP_HEADERS="x-tracetest-token=<token>" | ||
rails server -p 8080 | ||
``` |