minato-trace 0.1.6.pre.6 → 0.1.6.pre.8

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: 39b8bb1197b7ed2ff178447704bcd7874622a271607515f9a88f09c16238b5fb
4
- data.tar.gz: d9c9d19e94f4ba106dd967912be6da96cf55f568ff4afbb9f9a8cf037501a6ce
3
+ metadata.gz: b078fd8e99c2fca688086dc884237d7cc0df9b7983fa414a9f9445d31654d95e
4
+ data.tar.gz: 6ca475579e465b92f0b905056b42b46915d253f42330744bd3e1864fff5f640f
5
5
  SHA512:
6
- metadata.gz: acedef97441ea61b9318c9bcfab7e4a967f5d23996a1cf61c31859a40d3ba8154fd98dd63f48c845920f86cf914b6cbbeee412620c72b87f6345ba45e052a4d8
7
- data.tar.gz: 0a96cd5a060a194eaba77350928b3d46b52afe67e0853e2f8c6a329a2351557ddd22c426a19b7a9ab99778c9a31e4fe2da69142b3608460b96bae3479712537d
6
+ metadata.gz: 89bfdfcd138c7d2f6b1d6b4f13d6b3460052894b6b035a56113062c394ab08df76fc9e8610f8bbdaf8cfd180c39058bcd7acfaa7126ae97628918bf06ae138df
7
+ data.tar.gz: 4185e6c144ca45b6ad366ecfbbfb7fa5ecd49ca6e9b1977d65bd0bd591205aa25cf51717d076de838bfa06db4cf1f113a215c2e3ecf739371fcd9bcbd6e7b16a
data/README.md CHANGED
@@ -5,7 +5,7 @@ Add support to [Google Cloud Trace](https://cloud.google.com/trace) to your Mina
5
5
  Install this gem and your application will be abble to send trace information to Google Cloud Trace for any request. To configure distributed trace with other microservices see [Configuring distributed trace](#configuring-distributed-trace)
6
6
 
7
7
  ## Integration with Google Cloud Logging
8
- For integration with [Google Cloud Logging](https://cloud.google.com/logging?hl=en) you have to install [minato-logger-rails](https://gitlab.com/ferreri/minato/minato-logger-rails) v0.1.12+.
8
+ For integration with [Google Cloud Logging](https://cloud.google.com/logging?hl=en) you have to install [minato-logger-rails](https://gitlab.com/ferreri/minato/minato-logger-rails) v0.1.13+.
9
9
 
10
10
  ## Installation
11
11
  Add this line to your application's Gemfile:
@@ -34,7 +34,9 @@ config/initializers/{service_name}.rb
34
34
  end
35
35
  ```
36
36
  ## Disable trace
37
- Trace is enabled by default. If you want to disable trace, set an environment variable `MINATO_TRACE_DISABLE=true` in your app.
37
+ Trace is enabled by default in remote environments. If you want to disable trace, set an environment variable `MINATO_TRACE_DISABLE=true` in your app.
38
+
39
+ `In local environment like angeplus-infra-local, the trace is disabled by default.`
38
40
 
39
41
  ## Changelog
40
42
  Changelog information could be found [here](CHANGELOG.md).
@@ -21,6 +21,8 @@ module Minato
21
21
  def add_trace_context_header(env)
22
22
  return unless Rails.env.production? && Minato::Trace.enabled?
23
23
 
24
+ return if current_cloud_trace.nil?
25
+
24
26
  env.request_headers.merge!({ "#{TRACE_HEADER_KEY}": "#{current_cloud_trace.trace.trace_id};o=1" })
25
27
  end
26
28
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Minato
4
4
  module Trace
5
- VERSION = "0.1.6-6"
5
+ VERSION = "0.1.6-8"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minato-trace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6.pre.6
4
+ version: 0.1.6.pre.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ferreri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-20 00:00:00.000000000 Z
11
+ date: 2024-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-cloud-trace