bc-lightstep-ruby 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/bigcommerce/lightstep.rb +4 -1
- data/lib/bigcommerce/lightstep/configuration.rb +22 -1
- data/lib/bigcommerce/lightstep/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca2346b27774fd1f2a8429ea57c36d0a0d182d79a1ccad116e1fe4fc6e165ab6
|
4
|
+
data.tar.gz: 98984a6f2c4724c7d2a3501e9bca87c139d8f6bcaed42a6aac7f5e52805ce2a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dda3505bfa75067453146759ee0c855ee1370a6425bb7409715b894bb8545f25995114167bc4c7a667671e964900c7d01a53fe78f39e226f1cc01bf76171c67c
|
7
|
+
data.tar.gz: 7c58372609942e677c2ee6dc97b22a0dd917992f3aec27791950e7df43e7d2bb479a35b9dd63c53a7d42aef4a35e22f88a2d088324c24368895ea1feeb0e53fa
|
data/CHANGELOG.md
CHANGED
@@ -43,9 +43,12 @@ module Bigcommerce
|
|
43
43
|
component_name ||= ::Bigcommerce::Lightstep.component_name
|
44
44
|
transport_factory ||= ::Bigcommerce::Lightstep::TransportFactory.new
|
45
45
|
::LightStep.logger = logger
|
46
|
+
tags = {}
|
47
|
+
tags['service.version'] = ::Bigcommerce::Lightstep.release unless ::Bigcommerce::Lightstep.release.empty?
|
46
48
|
::LightStep.configure(
|
47
49
|
component_name: component_name,
|
48
|
-
transport: transport_factory.build
|
50
|
+
transport: transport_factory.build,
|
51
|
+
tags: tags
|
49
52
|
)
|
50
53
|
::LightStep.instance.max_span_records = ::Bigcommerce::Lightstep.max_buffered_spans
|
51
54
|
::LightStep.instance.max_log_records = ::Bigcommerce::Lightstep.max_log_records
|
@@ -113,13 +113,34 @@ module Bigcommerce
|
|
113
113
|
##
|
114
114
|
# Automatically determine environment
|
115
115
|
#
|
116
|
+
# @return [String]
|
117
|
+
#
|
116
118
|
def environment
|
117
119
|
if defined?(Rails)
|
118
120
|
Rails.env
|
119
121
|
else
|
120
|
-
|
122
|
+
env['RACK_ENV'] || env['RAILS_ENV'] || 'development'
|
121
123
|
end
|
122
124
|
end
|
125
|
+
|
126
|
+
##
|
127
|
+
# @return [String]
|
128
|
+
#
|
129
|
+
def release
|
130
|
+
unless @release
|
131
|
+
app_name = env.fetch('LIGHTSTEP_APP_NAME', env.fetch('NOMAD_JOB_NAME', '')).to_s
|
132
|
+
sha = env.fetch('LIGHTSTEP_RELEASE_SHA', env.fetch('NOMAD_META_RELEASE_SHA', '')).to_s
|
133
|
+
default_release = app_name.empty? && sha.empty? ? '' : "#{app_name}@#{sha}"
|
134
|
+
@release = env.fetch('LIGHTSTEP_RELEASE', default_release).to_s
|
135
|
+
end
|
136
|
+
@release
|
137
|
+
end
|
138
|
+
|
139
|
+
private
|
140
|
+
|
141
|
+
def env
|
142
|
+
ENV
|
143
|
+
end
|
123
144
|
end
|
124
145
|
end
|
125
146
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bc-lightstep-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shaun McCormick
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|