eventboss 1.9.6 → 1.9.8
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/eventboss/publisher.rb +2 -2
- data/lib/eventboss/sns_client.rb +13 -16
- data/lib/eventboss/version.rb +1 -1
- 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: c6155826edcd3e6c387de6ecc5f7cf8d7406397a13d62d906189f5f7263d1880
|
4
|
+
data.tar.gz: 12c8d107fbad150e915d89232bbbd3db50c7df554f9eb9f5ccc167b5e75fe3ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20b0f34459c49a1df77eb0866cfaf0ba7503a543fac3ccc96629d5b8d4d11e4acb0c2b3d98b88ddbaeea9f2267e3a07530e792c8ab9599fb608e5ce3da1a991a
|
7
|
+
data.tar.gz: 37e43169d46597336f94f21778b55d1c7fdc95194531b49c9218ea4a70a430d5fb57ff58176344d8ebae1b0ebef99b7d1c7fad96d9010e2321047a28d100ed4a
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
|
8
|
+
## [1.9.8]
|
9
|
+
|
10
|
+
- Improve performance by reusing SNS client
|
11
|
+
|
12
|
+
## [1.9.7]
|
13
|
+
|
14
|
+
- Fix undefined method 'set_data' for nil span in Sentry integration
|
15
|
+
|
7
16
|
## [1.9.6]
|
8
17
|
|
9
18
|
### Added
|
data/lib/eventboss/publisher.rb
CHANGED
@@ -37,11 +37,11 @@ module Eventboss
|
|
37
37
|
queue_name = Queue.build_name(destination: source, event_name: event_name, env: Eventboss.env, source_app: source)
|
38
38
|
|
39
39
|
::Sentry.with_child_span(op: 'queue.publish', description: "Eventboss push #{source}/#{event_name}") do |span|
|
40
|
-
span.set_data(::Sentry::Span::DataConventions::MESSAGING_DESTINATION_NAME, ::Eventboss::Sentry::Context.queue_name_for_sentry(queue_name))
|
40
|
+
span.set_data(::Sentry::Span::DataConventions::MESSAGING_DESTINATION_NAME, ::Eventboss::Sentry::Context.queue_name_for_sentry(queue_name)) if span
|
41
41
|
|
42
42
|
message = yield
|
43
43
|
|
44
|
-
span.set_data(::Sentry::Span::DataConventions::MESSAGING_MESSAGE_ID, message.message_id)
|
44
|
+
span.set_data(::Sentry::Span::DataConventions::MESSAGING_MESSAGE_ID, message.message_id) if span
|
45
45
|
message
|
46
46
|
end
|
47
47
|
end
|
data/lib/eventboss/sns_client.rb
CHANGED
@@ -39,25 +39,22 @@ module Eventboss
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def backend
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
@backend ||=
|
43
|
+
if configured?
|
44
|
+
options = {
|
45
|
+
region: configuration.eventboss_region
|
46
|
+
}
|
46
47
|
|
47
|
-
|
48
|
-
options[:credentials] = credentials
|
49
|
-
end
|
48
|
+
options[:credentials] = credentials unless configuration.eventboss_use_default_credentials
|
50
49
|
|
51
|
-
|
52
|
-
options[:endpoint] = configuration.aws_sns_endpoint
|
53
|
-
end
|
50
|
+
options[:endpoint] = configuration.aws_sns_endpoint if configuration.aws_sns_endpoint
|
54
51
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
52
|
+
Aws::SNS::Client.new(options)
|
53
|
+
elsif configuration.raise_on_missing_configuration
|
54
|
+
raise NotConfigured, 'Eventboss is not configured.'
|
55
|
+
else
|
56
|
+
Mock.new
|
57
|
+
end
|
61
58
|
end
|
62
59
|
|
63
60
|
def credentials
|
data/lib/eventboss/version.rb
CHANGED