epsagon 0.0.30 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8ebb5eb2134eb62b3b83fa8cbb48b9c535cf528999c55ad1b58ed161b63cd97
4
- data.tar.gz: 1e5ac5ea5ef2d6a3ba156b89061cca64bab22b90ce27b37e128a9b62c2633526
3
+ metadata.gz: d478fc58c432f30f98f666ae27e27b31bca3fd88254d0ef5b108b6d52a21d715
4
+ data.tar.gz: d535f30b5a159895c985ef0da98f1e1ea2c433db3f4163805fb5b3d6c7e1fa82
5
5
  SHA512:
6
- metadata.gz: 34adf61a4771b2e61f916a79f3e038a1b23235214d13ec9771c33e3a1be34edc843c735f2ca2fd6d1a84fc895e9ffd7f6ec4b7674b1ace141b39f193e0d7b7b0
7
- data.tar.gz: 289999c6c4d93c3521598fc0ac30eefd29f83e46f74079d1133b50d4a459c6f8e397f6fa1cf151492308d6089b9bfda9f9ed4279aab29c0e1de787aba26e4361
6
+ metadata.gz: 021e018a393a88cefb02c31ba2ee66fb5ec5f367b468ab1ed2b6537ba7e951ee3ccad40535ceed66b498589fbc1c5190cfac31f69a439a40afbc99547bbe4506
7
+ data.tar.gz: 0fc691d485e757bc0314acc6ef5901ea39a676da2725bed92700f2260b6f37e48025c5b25c2f9a0a18f46fb35cd175c11bb2843fabeb1dc960b7dd1367f79e2c
@@ -1,3 +1,3 @@
1
1
  module EpsagonConstants
2
- VERSION = '0.0.30'
2
+ VERSION = '0.0.31'
3
3
  end
@@ -76,11 +76,9 @@ class EpsagonRackMiddleware
76
76
 
77
77
  def call(env)
78
78
  original_env = env.dup
79
- extracted_context = OpenTelemetry.propagation.http.extract(env)
80
- frontend_context = create_frontend_span(env, extracted_context)
81
79
 
82
80
  # restore extracted context in this process:
83
- OpenTelemetry::Context.with_current(frontend_context || extracted_context) do
81
+ OpenTelemetry::Context.with_current(OpenTelemetry.propagation.http.extract(env)) do
84
82
  request_span_name = create_request_span_name(env['REQUEST_URI'] || original_env['PATH_INFO'])
85
83
  tracer.in_span(env['HTTP_HOST'] || 'unknown',
86
84
  attributes: request_span_attributes(env: env),
@@ -98,28 +96,10 @@ class EpsagonRackMiddleware
98
96
  end
99
97
  end
100
98
  end
101
- ensure
102
- finish_span(frontend_context)
103
99
  end
104
100
 
105
101
  private
106
102
 
107
- # return Context with the frontend span as the current span
108
- def create_frontend_span(env, extracted_context)
109
- request_start_time = QueueTime.get_request_start(env)
110
-
111
- return unless config[:record_frontend_span] && !request_start_time.nil?
112
-
113
- span = tracer.start_span('http_server.proxy',
114
- with_parent: extracted_context,
115
- attributes: {
116
- 'start_time' => request_start_time.to_f
117
- },
118
- kind: :server)
119
-
120
- OpenTelemetry::Trace.context_with_span(span, parent_context: extracted_context)
121
- end
122
-
123
103
  def finish_span(context)
124
104
  OpenTelemetry::Trace.current_span(context).finish if context
125
105
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epsagon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.30
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Epsagon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-04 00:00:00.000000000 Z
11
+ date: 2021-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api