sentry-ruby 5.26.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +26 -4
- data/README.md +2 -2
- data/lib/sentry/background_worker.rb +1 -4
- data/lib/sentry/backtrace/line.rb +99 -0
- data/lib/sentry/backtrace.rb +44 -76
- data/lib/sentry/breadcrumb.rb +1 -1
- data/lib/sentry/breadcrumb_buffer.rb +2 -2
- data/lib/sentry/check_in_event.rb +2 -2
- data/lib/sentry/client.rb +59 -136
- data/lib/sentry/configuration.rb +168 -78
- data/lib/sentry/cron/monitor_check_ins.rb +3 -3
- data/lib/sentry/cron/monitor_config.rb +2 -2
- data/lib/sentry/cron/monitor_schedule.rb +2 -2
- data/lib/sentry/debug_structured_logger.rb +94 -0
- data/lib/sentry/dsn.rb +32 -0
- data/lib/sentry/envelope/item.rb +3 -3
- data/lib/sentry/error_event.rb +3 -3
- data/lib/sentry/event.rb +4 -10
- data/lib/sentry/graphql.rb +1 -1
- data/lib/sentry/hub.rb +29 -5
- data/lib/sentry/interface.rb +1 -1
- data/lib/sentry/interfaces/exception.rb +2 -2
- data/lib/sentry/interfaces/request.rb +2 -0
- data/lib/sentry/interfaces/single_exception.rb +4 -4
- data/lib/sentry/interfaces/stacktrace.rb +3 -3
- data/lib/sentry/interfaces/stacktrace_builder.rb +0 -8
- data/lib/sentry/interfaces/threads.rb +2 -2
- data/lib/sentry/log_event.rb +33 -138
- data/lib/sentry/log_event_buffer.rb +13 -60
- data/lib/sentry/metric_event.rb +49 -0
- data/lib/sentry/metric_event_buffer.rb +28 -0
- data/lib/sentry/metrics.rb +47 -42
- data/lib/sentry/profiler.rb +4 -5
- data/lib/sentry/propagation_context.rb +55 -18
- data/lib/sentry/rspec.rb +1 -1
- data/lib/sentry/scope.rb +32 -5
- data/lib/sentry/sequel.rb +35 -0
- data/lib/sentry/span.rb +2 -17
- data/lib/sentry/std_lib_logger.rb +10 -1
- data/lib/sentry/telemetry_event_buffer.rb +130 -0
- data/lib/sentry/test_helper.rb +30 -0
- data/lib/sentry/transaction.rb +72 -95
- data/lib/sentry/transaction_event.rb +4 -9
- data/lib/sentry/transport/debug_transport.rb +70 -0
- data/lib/sentry/transport/dummy_transport.rb +1 -0
- data/lib/sentry/transport/http_transport.rb +9 -5
- data/lib/sentry/transport.rb +3 -5
- data/lib/sentry/utils/encoding_helper.rb +6 -0
- data/lib/sentry/utils/logging_helper.rb +25 -9
- data/lib/sentry/utils/sample_rand.rb +97 -0
- data/lib/sentry/utils/telemetry_attributes.rb +30 -0
- data/lib/sentry/vernier/profiler.rb +4 -3
- data/lib/sentry/version.rb +1 -1
- data/lib/sentry-ruby.rb +25 -30
- data/sentry-ruby-core.gemspec +1 -1
- data/sentry-ruby.gemspec +1 -1
- metadata +17 -17
- data/lib/sentry/metrics/aggregator.rb +0 -248
- data/lib/sentry/metrics/configuration.rb +0 -47
- data/lib/sentry/metrics/counter_metric.rb +0 -25
- data/lib/sentry/metrics/distribution_metric.rb +0 -25
- data/lib/sentry/metrics/gauge_metric.rb +0 -35
- data/lib/sentry/metrics/local_aggregator.rb +0 -53
- data/lib/sentry/metrics/metric.rb +0 -19
- data/lib/sentry/metrics/set_metric.rb +0 -28
- data/lib/sentry/metrics/timing.rb +0 -51
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Sentry
|
|
4
|
-
module Metrics
|
|
5
|
-
class Metric
|
|
6
|
-
def add(value)
|
|
7
|
-
raise NotImplementedError
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
def serialize
|
|
11
|
-
raise NotImplementedError
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def weight
|
|
15
|
-
raise NotImplementedError
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "set"
|
|
4
|
-
require "zlib"
|
|
5
|
-
|
|
6
|
-
module Sentry
|
|
7
|
-
module Metrics
|
|
8
|
-
class SetMetric < Metric
|
|
9
|
-
attr_reader :value
|
|
10
|
-
|
|
11
|
-
def initialize(value)
|
|
12
|
-
@value = Set[value]
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def add(value)
|
|
16
|
-
@value << value
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def serialize
|
|
20
|
-
value.map { |x| x.is_a?(String) ? Zlib.crc32(x) : x.to_i }
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def weight
|
|
24
|
-
value.size
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Sentry
|
|
4
|
-
module Metrics
|
|
5
|
-
module Timing
|
|
6
|
-
class << self
|
|
7
|
-
def nanosecond
|
|
8
|
-
time = Sentry.utc_now
|
|
9
|
-
time.to_i * (10 ** 9) + time.nsec
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def microsecond
|
|
13
|
-
time = Sentry.utc_now
|
|
14
|
-
time.to_i * (10 ** 6) + time.usec
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def millisecond
|
|
18
|
-
Sentry.utc_now.to_i * (10 ** 3)
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def second
|
|
22
|
-
Sentry.utc_now.to_i
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def minute
|
|
26
|
-
Sentry.utc_now.to_i / 60.0
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def hour
|
|
30
|
-
Sentry.utc_now.to_i / 3600.0
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def day
|
|
34
|
-
Sentry.utc_now.to_i / (3600.0 * 24.0)
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def week
|
|
38
|
-
Sentry.utc_now.to_i / (3600.0 * 24.0 * 7.0)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def duration_start
|
|
42
|
-
Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def duration_end(start)
|
|
46
|
-
Process.clock_gettime(Process::CLOCK_MONOTONIC) - start
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|