bugsnag_performance 1.0.0 → 1.1.0

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
2
  SHA256:
3
- metadata.gz: 7209ef5a16d1a1f40cc5100f44f935f4deb13ada6eb5de82c785b823ef7c975a
4
- data.tar.gz: 81d7fc68ae82ccca8d7aa1ca34fa15abd59fe72f9f17775a4100e11c4256ac6a
3
+ metadata.gz: 16b53d0871422f913e95d93643d2d1aa0418b18d133ade895205d85eed381154
4
+ data.tar.gz: ef02ef87c516f7623bd37b789c8ce049f4694a62c2523d5c3e238bf1e2df48c0
5
5
  SHA512:
6
- metadata.gz: 2348391589b8bbce569efbeaff908dba3112364ef8f76c32197f00a9b095d876b52cba246e6e4c25ffd92e4b9856b2be234c9c17ecd04d54a9f252ac8aec68d5
7
- data.tar.gz: 87594a7d40c5249cc60f28db2699df868d1f21adbd67d27647a070fa323957f0c19710fae24af4e6c59390726168a8ca84cdd62358bc3da5568a9498ee80cabb
6
+ metadata.gz: 908684dcbcd86f940020f3971a0b906bbf492a91a1d5aa8ad209d1a6eebed526da5020d320718956022fda346d972602d4db377afaa529ebb212ac8636dd75c7
7
+ data.tar.gz: d7f01073bd566171437084c5f0dd4b909ca6d9e9fb23bf6d13b12b1c07ac81edcd13c44d6ae23cd3f0805dad5163d2f21f7e98056762accc7ba3f3ee010df9e1
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## 1.1.0 (2025-07-07)
5
+
6
+ ### Enhancements
7
+
8
+ * Set default endpoints based on API key
9
+ [#51](https://github.com/bugsnag/bugsnag-ruby/pull/51)
10
+
4
11
  ## 1.0.0 (2024-12-09)
5
12
 
6
13
  ### Enhancements
@@ -59,6 +59,8 @@ module BugsnagPerformance
59
59
 
60
60
  attr_writer :endpoint
61
61
 
62
+ HUB_PREFIX = "00000"
63
+
62
64
  def initialize(errors_configuration)
63
65
  @open_telemetry_configure_block = proc { |c| }
64
66
  self.logger = errors_configuration.logger || OpenTelemetry.logger
@@ -92,7 +94,7 @@ module BugsnagPerformance
92
94
 
93
95
  # The URL to send traces to
94
96
  #
95
- # If not set this defaults to "https://<api_key>.otlp.bugsnag.com/v1/traces"
97
+ # If not set this defaults to "https://<api_key>.otlp.bugsnag.com/v1/traces" or "https://<api_key>.otlp.insighthub.smartbear.com/v1/traces", depending on the API key
96
98
  #
97
99
  # @return [String, nil]
98
100
  def endpoint
@@ -104,7 +106,12 @@ module BugsnagPerformance
104
106
  # if there's no API key then we can't construct the default URL
105
107
  nil
106
108
  else
107
- "https://#{@api_key}.otlp.bugsnag.com/v1/traces"
109
+ instance = if hub_api_key?
110
+ "insighthub.smartbear.com"
111
+ else
112
+ "bugsnag.com"
113
+ end
114
+ "https://#{@api_key}.otlp.#{instance}/v1/traces"
108
115
  end
109
116
  end
110
117
 
@@ -134,5 +141,9 @@ module BugsnagPerformance
134
141
 
135
142
  default
136
143
  end
144
+
145
+ def hub_api_key?
146
+ @api_key.is_a?(String) && @api_key&.start_with?(HUB_PREFIX)
147
+ end
137
148
  end
138
149
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BugsnagPerformance
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  SDK_NAME = "Ruby Bugsnag Performance SDK"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugsnag_performance
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BugSnag
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-09 00:00:00.000000000 Z
11
+ date: 2025-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -122,7 +122,7 @@ metadata:
122
122
  homepage_uri: https://www.bugsnag.com
123
123
  source_code_uri: https://github.com/bugsnag/bugsnag-ruby-performance
124
124
  bug_tracker_uri: https://github.com/bugsnag/bugsnag-ruby-performance/issues
125
- changelog_uri: https://github.com/bugsnag/bugsnag-ruby-performance/blob/v1.0.0/CHANGELOG.md
125
+ changelog_uri: https://github.com/bugsnag/bugsnag-ruby-performance/blob/v1.1.0/CHANGELOG.md
126
126
  documentation_uri: https://docs.bugsnag.com/performance/integration-guides/ruby/
127
127
  rubygems_mfa_required: 'true'
128
128
  post_install_message: