gitlab-labkit 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/gitlab-labkit.gemspec +1 -1
- data/lib/labkit/tracing.rb +7 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d919fa4752324f93efc91b81d0ad700dac81988219ee5c9644dff15bb895d346
|
4
|
+
data.tar.gz: 1fb117e24ae71099aae9c9d9983f0075f6b5a19ca8d344a0e83ceef0a5d45e5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ed25dcd8ce2a723732a65aedd666af035af7c68717bcceec18d82af8a4eb60852e29a034c97fa252c73071a254075de93e7108cf21f319de0e32aae15464b4b
|
7
|
+
data.tar.gz: c802b193c9533b871b98e6f84c04d8670de366cc88bd0c66aea2df17a30f20ce85f34509c3107d35c6af004fa34ea78a6441bd751a5e305c900fde3db4e2027b
|
data/gitlab-labkit.gemspec
CHANGED
data/lib/labkit/tracing.rb
CHANGED
@@ -11,8 +11,8 @@ module Labkit
|
|
11
11
|
autoload :RackMiddleware, 'labkit/tracing/rack_middleware'
|
12
12
|
|
13
13
|
module Rails
|
14
|
-
autoload :ActionViewSubscriber, 'labkit/tracing/rails/action_view_subscriber
|
15
|
-
autoload :ActiveRecordSubscriber, 'labkit/tracing/rails/active_record_subscriber
|
14
|
+
autoload :ActionViewSubscriber, 'labkit/tracing/rails/action_view_subscriber'
|
15
|
+
autoload :ActiveRecordSubscriber, 'labkit/tracing/rails/active_record_subscriber'
|
16
16
|
autoload :RailsCommon, 'labkit/tracing/rails/rails_common'
|
17
17
|
end
|
18
18
|
|
@@ -47,7 +47,11 @@ module Labkit
|
|
47
47
|
def self.tracing_url(service_name)
|
48
48
|
return unless tracing_url_enabled?
|
49
49
|
|
50
|
-
|
50
|
+
correlation_id = Labkit::Correlation::CorrelationId.current_id.to_s
|
51
|
+
|
52
|
+
# Avoid using `format` since it can throw TypeErrors
|
53
|
+
# which we want to avoid on unsanitised env var input
|
54
|
+
tracing_url_template.to_s.gsub('{{ correlation_id }}', correlation_id).gsub('{{ service }}', service_name)
|
51
55
|
end
|
52
56
|
end
|
53
57
|
end
|