opencensus-stackdriver 0.1.1 → 0.1.2
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6648ab08a2f19dcc8378487f54025f43d3f0fbbf5144582a095eb1df50d899a8
|
4
|
+
data.tar.gz: b35b154b195811a9fc6a69cbdf553825f59818390a8e80dbbd9d7138767c8934
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59d6285c74a85ed961450af1a9d847c436aecd190ad7afae0c76206e0eb33fb7d30eecaa382ab8039a668d8f232a574c5bad65a6b24641d399a57b5fd973db16
|
7
|
+
data.tar.gz: 4559660ff5249c3535b42f4e813c1b93adf026d07c152d855d3c86cd18768fb5d6bd6a6d3430807cc89dbd63c3eb129b4ac949524ee43ca86e3f760bf5b2b0f0
|
data/CHANGELOG.md
CHANGED
@@ -37,6 +37,21 @@ module OpenCensus
|
|
37
37
|
#
|
38
38
|
TraceProtos = Google::Devtools::Cloudtrace::V2
|
39
39
|
|
40
|
+
##
|
41
|
+
# @private
|
42
|
+
# Attribute key for Stackdriver trace agent
|
43
|
+
#
|
44
|
+
AGENT_KEY = "g.co/agent".freeze
|
45
|
+
|
46
|
+
##
|
47
|
+
# @private
|
48
|
+
# Attribute value for Stackdriver trace agent
|
49
|
+
#
|
50
|
+
AGENT_VALUE =
|
51
|
+
OpenCensus::Trace::TruncatableString.new \
|
52
|
+
"opencensus-ruby [#{::OpenCensus::VERSION}] ruby-stackdriver-" \
|
53
|
+
"exporter [#{::OpenCensus::Stackdriver::VERSION}]"
|
54
|
+
|
40
55
|
##
|
41
56
|
# Create a converter
|
42
57
|
#
|
@@ -66,7 +81,8 @@ module OpenCensus
|
|
66
81
|
end_time: convert_time(obj.end_time),
|
67
82
|
attributes:
|
68
83
|
convert_attributes(obj.attributes,
|
69
|
-
obj.dropped_attributes_count
|
84
|
+
obj.dropped_attributes_count,
|
85
|
+
include_agent_attribute: true),
|
70
86
|
stack_trace:
|
71
87
|
convert_stack_trace(obj.stack_trace, obj.dropped_frames_count,
|
72
88
|
obj.stack_trace_hash_id),
|
@@ -159,11 +175,17 @@ module OpenCensus
|
|
159
175
|
#
|
160
176
|
# @param [Hash] attributes The map of attribute values to convert
|
161
177
|
# @param [Integer] dropped_attributes_count Number of dropped
|
178
|
+
# @param [Boolean] include_agent_attribute Include the `g.co/agent`
|
179
|
+
# attribute in the result. Default is false.
|
162
180
|
# @return [Google::Devtools::Cloudtrace::V2::Attributes] The
|
163
181
|
# generated proto
|
164
182
|
#
|
165
|
-
def convert_attributes attributes, dropped_attributes_count
|
183
|
+
def convert_attributes attributes, dropped_attributes_count,
|
184
|
+
include_agent_attribute: false
|
166
185
|
attribute_map = {}
|
186
|
+
if include_agent_attribute
|
187
|
+
attribute_map[AGENT_KEY] = convert_attribute_value AGENT_VALUE
|
188
|
+
end
|
167
189
|
attributes.each do |k, v|
|
168
190
|
attribute_map[k] = convert_attribute_value v
|
169
191
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opencensus-stackdriver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Azuma
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -217,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
217
217
|
version: '0'
|
218
218
|
requirements: []
|
219
219
|
rubyforge_project:
|
220
|
-
rubygems_version: 2.6
|
220
|
+
rubygems_version: 2.7.6
|
221
221
|
signing_key:
|
222
222
|
specification_version: 4
|
223
223
|
summary: Stackdriver exporter for OpenCensus
|