Skip to content

Commit eb03cec

Browse files
authored
Merge pull request #161 from hennevogel/bugfix/exceptions
Account for more emptiness
2 parents cf178d5 + 762a177 commit eb03cec

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ Reported values:
5555

5656
```ruby
5757
controller: 48.467,
58-
view: 46.848
58+
view: 46.848,
5959
db: 0.157,
60-
started: 1465839830100400200
60+
started: 1465839830100400200,
6161
request_id: "d5bf620b-3494-425b-b7e1-4953597ea744"
6262
```
6363

@@ -71,14 +71,15 @@ Reported tags:
7171
method: "PostsController#index",
7272
http_method: "GET",
7373
format: "html",
74-
status: ["200", ""]
75-
exception: ["", "ArgumentError"]
74+
status: ["200", ""],
75+
exception: "ArgumentError"
7676
}
7777
```
7878

7979
*Note*: If an exception happens during that particular instrumentation the
8080
`status` will be blank and the tag `exception` will contain the name of the
81-
exception class.
81+
exception class. The status is blank because we can't know how you handle it
82+
outside the action.
8283

8384
### Action View
8485

@@ -100,11 +101,11 @@ Reported values:
100101
Reported tags:
101102

102103
```ruby
103-
hook: ["render_template", "render_partial", "render_collection"]
104+
hook: ["render_template", "render_partial", "render_collection"],
104105
server: Socket.gethostname,
105106
app_name: configuration.application_name,
106107
location: "PostsController#index",
107-
filename: "/some/file/action.html",
108+
filename: "/some/file/action.html"
108109
```
109110

110111
### Active Record
@@ -258,7 +259,7 @@ end
258259
Reported tags:
259260

260261
```ruby
261-
hook: "block_instrumentation"
262+
hook: "block_instrumentation",
262263
server: Socket.gethostname,
263264
app_name: configuration.application_name,
264265
location: "PostsController#index",

lib/influxdb/rails/tags.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def initialize(config:, tags: {}, additional_tags: InfluxDB::Rails.current.tags)
99

1010
def to_h
1111
expanded_tags.reject do |_, value|
12-
value.nil? || value == ""
12+
value.blank?
1313
end
1414
end
1515

lib/influxdb/rails/values.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def initialize(values: {}, additional_values: InfluxDB::Rails.current.values)
88

99
def to_h
1010
expanded_values.reject do |_, value|
11-
value.nil? || value == ""
11+
value.blank?
1212
end
1313
end
1414

0 commit comments

Comments
 (0)