uptrace-ruby is an OpenTelemetry Ruby distribution that configures OpenTelemetry SDK to export traces, metrics, and logs to Uptrace via OTLP/HTTP. It is a thin wrapper — not a reimplementation.
bundle installRun all checks (tests + rubocop + yard):
bundle exec rakeRun individually:
bundle exec rake test # minitest
bundle exec rake rubocop # linter
bundle exec rake yard # docsAll source lives in lib/:
uptrace.rb— main module,configure_opentelemetryentry point, sets up span/metric/log exporters with gzip compression and batch processinguptrace/client.rb— reads DSN from param orUPTRACE_DSNenv var, generates trace URLsuptrace/dsn.rb— parses and validates Uptrace DSN connection stringsuptrace/id_generator.rb— custom trace/span ID generator using timestamp + random bytesuptrace/version.rb— gem version constant
Tests use Minitest in test/. Run with bundle exec rake test. Currently covers DSN parsing.
- All files start with
# frozen_string_literal: true - Ruby >= 3.0
- RuboCop enforced with
rubocop-rakeandrubocop-minitestplugins - Line length, method length, and ABC size checks are disabled
- YARD documentation with Markdown markup
- Update version in
lib/uptrace/version.rb gem build uptrace.gemspecgem push uptrace-X.Y.Z.gem