File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ Or install it yourself as:
2121
2222### Dependency
2323* [ Datadog] ( https://github.com/DataDog/dd-trace-rb ) must be integrated in the project before we use this gem
24-
24+ * use version <=1.0.4 for ruby <3.4
2525# Quick Use
2626## Send notification to datadog(Traces to add errors in Datadog)
2727``` DatadogNotifier.notify(exception, payload_json) ```
Original file line number Diff line number Diff line change 22
33lib = File . expand_path ( 'lib' , __dir__ )
44$LOAD_PATH. unshift ( lib ) unless $LOAD_PATH. include? ( lib )
5- require ' datadog_notifier'
5+ # Don't require datadog_notifier here - it has dependencies that aren't installed yet during bundle install
66require 'datadog_notifier/version'
77
88Gem ::Specification . new do |spec |
99 spec . name = 'datadog_notifier'
1010 spec . version = DatadogNotifier ::VERSION
1111 spec . authors = [ 'Patterninc' ]
1212 spec . email = [ 'amol.udage@pattern.com' ]
13- spec . summary = 'Datadog notifier to send custom errors with ddtrace '
13+ spec . summary = 'Datadog notifier to send custom errors with datadog '
1414 spec . description = 'Datadog notifier to send custom errors in Datadog error tracking dashboard'
1515 spec . homepage = 'https://github.com/patterninc/datadog_notifier'
1616 spec . license = 'MIT'
1717
18- spec . add_dependency 'ddtrace' , '>= 1.13.0'
18+ ruby_version = Gem ::Version . new ( RUBY_VERSION )
19+ breaking_version = Gem ::Version . new ( '3.4' )
20+
21+ if ruby_version >= breaking_version
22+ spec . add_dependency 'datadog' , '>= 2.0.0'
23+ else
24+ spec . add_dependency 'ddtrace' , '>= 1.13.0'
25+ end
1926
2027 # Specify which files should be added to the gem when it is released.
2128 # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- require 'ddtrace'
3+ if RUBY_VERSION < '3.4'
4+ require 'ddtrace'
5+ else
6+ require 'datadog'
7+ end
48require 'datadog_notifier_exception'
59require 'datadog_notifier/version'
610
You can’t perform that action at this time.
0 commit comments