atatus 1.1.0 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19bb396dacbaf9a052b4b3d35b31dac1e696a8f511147b1aaadc54a43bceccbc
4
- data.tar.gz: e39e3ee409263c6705f19d22b643297d6447fbf761957d6d528104bfe571e608
3
+ metadata.gz: d6399d781fb6ed0fbf4d275871f8badd44feef60f0579fb98395471d837ab0a2
4
+ data.tar.gz: 0da5efde082affe391be507829d4cfb2eac79e9e7d87e35143e86857167f2407
5
5
  SHA512:
6
- metadata.gz: a1215f5b881147e211257ff53eb61c2f2a6a9acde21cc1a2b4a4b5ac80d77b5b1661c70ef7997f426537732578439106b05c806dec366b3a472dff34a9d4cab9
7
- data.tar.gz: 1368782a8b6e6f58a729853cbc0f4e26acc68713a19da41f4be3db66ea1dbb6b47e4faf03b3fd5a73962a27b74683963fb145ba7dfb157e5488085e0601962ec
6
+ metadata.gz: 9332acfc6e05a1627e05e98dcf9ab3bfee8c7e111f1ccc41300340b54650e5d56145a0cbc46da4f07bd4b2084cc4af0e57ccdadf55831d6732309d573dd8eb78
7
+ data.tar.gz: b0570c4ea30150e82bdaaf1f61939ec405205a96e3808654bb3e2aaf5a156a0f25d825038c19286ca9d3774175ad5568156baa43fb5cd08b98703e3eeb55eb13
@@ -4,12 +4,16 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 1.2.0 (Tue, 21 Jan 2020)
8
+
9
+ - Updated Sidekiq operation as background transaction.
10
+
11
+
7
12
  ## 1.1.0 (Thu, 5 Dec 2019)
8
13
 
9
- - Added HTTP context for External Requests in traces.
10
- - Added layer duration for Ruby code.
11
- - Fixed time calculations in database calls where min, average calculation was incorrect.
12
- - Removed stacktrace frame for libraries.
14
+ - New layer for Ruby is added to represent time spent in Application.
15
+ - Handling of database calls min, average is fixed.
16
+ - Error stacktraces are only captured for in app code, the libraries code is removed.
13
17
 
14
18
 
15
19
  ## 1.0.2 (Thu, 21 Nov 2019)
@@ -10,12 +10,13 @@ SpanTiming = Struct.new(:start, :end)
10
10
  module Atatus
11
11
  module Collector
12
12
  class Txn < Layer
13
- def initialize(type, kind, duration)
13
+ def initialize(type, kind, duration, background: false)
14
14
  super(type, kind, duration)
15
15
  @spans = {}
16
+ @background = background
16
17
  end
17
18
 
18
- attr_reader :spans
19
+ attr_reader :spans, :background
19
20
  end
20
21
 
21
22
  class Base
@@ -148,7 +149,14 @@ module Atatus
148
149
 
149
150
  @txns_lock.synchronize do
150
151
  if !@txns_agg.key?(txn.name)
151
- @txns_agg[txn.name] = Txn.new(@config.framework_name, "Ruby", txn.duration)
152
+ txn_type = @config.framework_name || "Ruby"
153
+ background = false
154
+ if !txn.type.nil?
155
+ if txn.type == "Sidekiq"
156
+ background = true
157
+ end
158
+ end
159
+ @txns_agg[txn.name] = Txn.new(txn_type, "Ruby", txn.duration, background: background)
152
160
  @txns_agg[txn.name].id = txn.id
153
161
  @txns_agg[txn.name].pid = txn.id
154
162
  else
@@ -131,16 +131,22 @@ module Atatus
131
131
  {}
132
132
  end
133
133
 
134
- def build_metric(name, value)
134
+ def build_metric(name, value, background: false)
135
135
  return unless name
136
136
  return unless value
137
137
 
138
- {
139
- name: name,
140
- type: value.type,
141
- kind: value.kind,
142
- durations: [value.count, Util.ms(value.total), Util.ms(value.min), Util.ms(value.max)]
143
- }
138
+ m = {
139
+ name: name,
140
+ type: value.type,
141
+ kind: value.kind,
142
+ durations: [value.count, Util.ms(value.total), Util.ms(value.min), Util.ms(value.max)],
143
+ }
144
+
145
+ if background == true
146
+ m[:background] = background
147
+ end
148
+
149
+ m
144
150
  end
145
151
 
146
152
  def build_request(context)
@@ -178,7 +184,7 @@ module Atatus
178
184
  def build_txns_obj(data)
179
185
  txns = []
180
186
  data.each do |t, v|
181
- txn = build_metric(t, v)
187
+ txn = build_metric(t, v, background: v.background)
182
188
  txn[:traces] = []
183
189
  v.spans.each do |l, u|
184
190
  txn[:traces] << build_metric(l, u)
@@ -48,6 +48,9 @@ module Atatus
48
48
  'graphql' => 'GraphQL',
49
49
  'elasticsearch' => 'Elasticsearch',
50
50
  'cassandra' => 'Cassandra',
51
+ 'sqlite'=> 'SQLite',
52
+ 'controller' => 'Controller',
53
+ 'view' => 'View',
51
54
  'http' => 'External Requests',
52
55
  'http2' => 'External Requests',
53
56
  'http_rb' => 'External Requests',
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Atatus
4
- VERSION = '1.1.0'
4
+ VERSION = '1.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atatus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atatus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-05 00:00:00.000000000 Z
11
+ date: 2020-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby