Skip to content

Commit

Permalink
Merge pull request #192 from plural/open-telemetry
Browse files Browse the repository at this point in the history
Add OpenTelemetry gems and initializer.
  • Loading branch information
plural authored Jul 15, 2023
2 parents 2f28213 + a133a29 commit 792a4de
Show file tree
Hide file tree
Showing 3 changed files with 212 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ gem 'rspec_api_documentation'
gem "apitome"
gem 'jwt'

# Observability and monitoring via OpenTelemetry.
gem 'opentelemetry-sdk'
gem 'opentelemetry-exporter-otlp'
gem 'opentelemetry-instrumentation-all'

group :development, :test do
gem "brakeman", "~> 5.2"
gem "bundler-audit", "~> 0.9.0"
Expand Down
200 changes: 200 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ GEM
i18n (>= 1.8.11, < 2)
globalid (1.1.0)
activesupport (>= 5.0)
google-protobuf (3.23.4-aarch64-linux)
google-protobuf (3.23.4-arm64-darwin)
google-protobuf (3.23.4-x86_64-darwin)
google-protobuf (3.23.4-x86_64-linux)
googleapis-common-protos-types (1.6.0)
google-protobuf (~> 3.14)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
io-console (0.6.0)
Expand Down Expand Up @@ -140,6 +146,196 @@ GEM
racc (~> 1.4)
nokogiri (1.15.2-x86_64-linux)
racc (~> 1.4)
opentelemetry-api (1.1.0)
opentelemetry-common (0.19.7)
opentelemetry-api (~> 1.0)
opentelemetry-exporter-otlp (0.25.0)
google-protobuf (~> 3.19)
googleapis-common-protos-types (~> 1.3)
opentelemetry-api (~> 1.1)
opentelemetry-common (~> 0.19.6)
opentelemetry-sdk (~> 1.2)
opentelemetry-semantic_conventions
opentelemetry-instrumentation-action_pack (0.7.0)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-rack (~> 0.21)
opentelemetry-instrumentation-action_view (0.6.0)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-active_support (~> 0.1)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-active_job (0.5.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-active_model_serializers (0.20.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-active_record (0.6.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
ruby2_keywords
opentelemetry-instrumentation-active_support (0.4.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-all (0.39.1)
opentelemetry-instrumentation-active_model_serializers (~> 0.20.1)
opentelemetry-instrumentation-aws_sdk (~> 0.4.1)
opentelemetry-instrumentation-bunny (~> 0.20.1)
opentelemetry-instrumentation-concurrent_ruby (~> 0.21.1)
opentelemetry-instrumentation-dalli (~> 0.24.1)
opentelemetry-instrumentation-delayed_job (~> 0.20.1)
opentelemetry-instrumentation-ethon (~> 0.21.1)
opentelemetry-instrumentation-excon (~> 0.21.1)
opentelemetry-instrumentation-faraday (~> 0.23.1)
opentelemetry-instrumentation-grape (~> 0.1.3)
opentelemetry-instrumentation-graphql (~> 0.26.2)
opentelemetry-instrumentation-http (~> 0.23.1)
opentelemetry-instrumentation-http_client (~> 0.22.1)
opentelemetry-instrumentation-koala (~> 0.20.1)
opentelemetry-instrumentation-lmdb (~> 0.22.1)
opentelemetry-instrumentation-mongo (~> 0.22.1)
opentelemetry-instrumentation-mysql2 (~> 0.24.2)
opentelemetry-instrumentation-net_http (~> 0.22.1)
opentelemetry-instrumentation-pg (~> 0.25.2)
opentelemetry-instrumentation-que (~> 0.6.1)
opentelemetry-instrumentation-racecar (~> 0.2.1)
opentelemetry-instrumentation-rack (~> 0.23.1)
opentelemetry-instrumentation-rails (~> 0.27.1)
opentelemetry-instrumentation-rake (~> 0.2.1)
opentelemetry-instrumentation-rdkafka (~> 0.3.1)
opentelemetry-instrumentation-redis (~> 0.25.1)
opentelemetry-instrumentation-resque (~> 0.4.1)
opentelemetry-instrumentation-restclient (~> 0.22.1)
opentelemetry-instrumentation-ruby_kafka (~> 0.20.1)
opentelemetry-instrumentation-sidekiq (~> 0.24.1)
opentelemetry-instrumentation-sinatra (~> 0.23.1)
opentelemetry-instrumentation-trilogy (~> 0.56.1)
opentelemetry-instrumentation-aws_sdk (0.4.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-base (0.22.1)
opentelemetry-api (~> 1.0)
opentelemetry-registry (~> 0.1)
opentelemetry-instrumentation-bunny (0.20.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-concurrent_ruby (0.21.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-dalli (0.24.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-delayed_job (0.20.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-ethon (0.21.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-excon (0.21.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-faraday (0.23.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-grape (0.1.3)
opentelemetry-api (~> 1.1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-rack (~> 0.21)
opentelemetry-instrumentation-graphql (0.26.2)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-http (0.23.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-http_client (0.22.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-koala (0.20.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-lmdb (0.22.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-mongo (0.22.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-mysql2 (0.24.2)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-net_http (0.22.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-pg (0.25.2)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-que (0.6.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-racecar (0.2.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-rack (0.23.2)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-rails (0.27.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-action_pack (~> 0.7.0)
opentelemetry-instrumentation-action_view (~> 0.6.0)
opentelemetry-instrumentation-active_job (~> 0.5.1)
opentelemetry-instrumentation-active_record (~> 0.6.1)
opentelemetry-instrumentation-active_support (~> 0.4.1)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-rake (0.2.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-rdkafka (0.3.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-redis (0.25.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-resque (0.4.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-restclient (0.22.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-ruby_kafka (0.20.1)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-sidekiq (0.24.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-sinatra (0.23.1)
opentelemetry-api (~> 1.0)
opentelemetry-common (~> 0.19.3)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-instrumentation-rack (~> 0.21)
opentelemetry-instrumentation-trilogy (0.56.2)
opentelemetry-api (~> 1.0)
opentelemetry-instrumentation-base (~> 0.22.1)
opentelemetry-semantic_conventions (>= 1.8.0)
opentelemetry-registry (0.3.0)
opentelemetry-api (~> 1.1)
opentelemetry-sdk (1.2.1)
opentelemetry-api (~> 1.1)
opentelemetry-common (~> 0.19.3)
opentelemetry-registry (~> 0.2)
opentelemetry-semantic_conventions
opentelemetry-semantic_conventions (1.10.0)
opentelemetry-api (~> 1.0)
parslet (2.0.0)
pg (1.4.6)
puma (5.6.5)
Expand Down Expand Up @@ -207,6 +403,7 @@ GEM
activesupport (>= 3.0.0)
mustache (~> 1.0, >= 0.99.4)
rspec (~> 3.0)
ruby2_keywords (0.0.5)
scenic (1.7.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
Expand Down Expand Up @@ -251,6 +448,9 @@ DEPENDENCIES
faker
jsonapi-resources
jwt
opentelemetry-exporter-otlp
opentelemetry-instrumentation-all
opentelemetry-sdk
parslet
pg (~> 1.1)
puma (~> 5.6)
Expand Down
7 changes: 7 additions & 0 deletions config/initializers/opentelemetry.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
require 'opentelemetry/sdk'
require 'opentelemetry/exporter/otlp'
require 'opentelemetry/instrumentation/all'

OpenTelemetry::SDK.configure do |c|
c.use_all() # enables all instrumentation!
end

0 comments on commit 792a4de

Please sign in to comment.