bugsnag_performance 0.3.0 → 1.0.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: e9bc8d797c0a3b633e73e88a5d4f399df04bb2fb8063b1a11c42bec974dfec5c
4
- data.tar.gz: 4554ce3963bc8b4861d586c539b7186ab4550a871586cbe7ad646af5b3b35cbc
3
+ metadata.gz: 7209ef5a16d1a1f40cc5100f44f935f4deb13ada6eb5de82c785b823ef7c975a
4
+ data.tar.gz: 81d7fc68ae82ccca8d7aa1ca34fa15abd59fe72f9f17775a4100e11c4256ac6a
5
5
  SHA512:
6
- metadata.gz: 1467c6a19cf3766d3e5794714c2ad36f145c00b4a23b66a55c1375f72aafd9168c70495a2b57e053f28d7a9d9029825e2ea35051e615bf5c5fa5fbd11298e6be
7
- data.tar.gz: c6fcb31b7d1ac9cba893c8600a0624662a15e64b6e82ba822da113388238c8772d85e0a585ee50683906f99bbb3b596bdcf8501f1b6628c915f9ba2922585a5c
6
+ metadata.gz: 2348391589b8bbce569efbeaff908dba3112364ef8f76c32197f00a9b095d876b52cba246e6e4c25ffd92e4b9856b2be234c9c17ecd04d54a9f252ac8aec68d5
7
+ data.tar.gz: 87594a7d40c5249cc60f28db2699df868d1f21adbd67d27647a070fa323957f0c19710fae24af4e6c59390726168a8ca84cdd62358bc3da5568a9498ee80cabb
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## 1.0.0 (2024-12-09)
5
+
6
+ ### Enhancements
7
+
8
+ * Consolidate Ruby/Ruby-Perf environment variables.
9
+ [#45](https://github.com/bugsnag/bugsnag-ruby-performance/pull/45)
10
+
11
+ * Restore Bugsnag-Sent-At header.
12
+ [#46](https://github.com/bugsnag/bugsnag-ruby-performance/pull/46)
13
+
4
14
  ## 0.3.0 (2024-11-13)
5
15
 
6
16
  ### Enhancements
data/CODEOWNERS ADDED
@@ -0,0 +1 @@
1
+ lib/ @imjoehaines @DariaKunoichi
data/README.md CHANGED
@@ -9,9 +9,9 @@
9
9
  </div>
10
10
 
11
11
  [![Documentation](https://img.shields.io/badge/documentation-latest-blue.svg)](https://docs.bugsnag.com/performance/ruby/)
12
- [![Build status](https://github.com/bugsnag/bugsnag-ruby-performance/actions/workflows/maze-runner.yml/badge.svg?branch=main)](https://github.com/bugsnag/bugsnag-ruby-performance/actions/workflows/maze-runner.yml)
12
+ [![Build status](https://github.com/bugsnag/bugsnag-ruby-performance/actions/workflows/maze-runner.yml/badge.svg?branch=next)](https://github.com/bugsnag/bugsnag-ruby-performance/actions/workflows/maze-runner.yml)
13
13
 
14
- Convenience SDK for using the [Ruby Otel SDK](https://github.com/open-telemetry/opentelemetry-ruby) with BugSnag.
14
+ Convenience SDK for using the [Ruby OpenTelemetry SDK](https://github.com/open-telemetry/opentelemetry-ruby) with BugSnag.
15
15
 
16
16
  ## Features
17
17
 
@@ -30,4 +30,4 @@ For integration instructions, see our online docs: [docs.bugsnag.com/performance
30
30
 
31
31
  ## License
32
32
 
33
- The BugSnag Ruby performance SDK is free software released under the MIT License. See [LICENSE.txt](LICENSE.txt) for details.
33
+ The BugSnag Ruby Performance SDK is free software released under the MIT License. See [LICENSE.txt](LICENSE.txt) for details.
data/SECURITY.md ADDED
@@ -0,0 +1,11 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
7
+ | 1.x | Yes |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ If you find a vulnerability in this SDK, please report it to our [Support team](mailto:support@bugsnag.com) for review.
@@ -49,6 +49,14 @@ module BugsnagPerformance
49
49
  # @return [Array<String>, nil]
50
50
  attr_accessor :enabled_release_stages
51
51
 
52
+ # The name of the service that is being traced
53
+ #
54
+ # If not set, this will default to the Open Telemetry SDK service name
55
+ # or the value set by the "OTEL_SERVICE_NAME" environment variable
56
+ #
57
+ # @return [String]
58
+ attr_accessor :service_name
59
+
52
60
  attr_writer :endpoint
53
61
 
54
62
  def initialize(errors_configuration)
@@ -59,6 +67,11 @@ module BugsnagPerformance
59
67
  @app_version = fetch(errors_configuration, :app_version, env: "BUGSNAG_PERFORMANCE_APP_VERSION")
60
68
  @release_stage = fetch(errors_configuration, :release_stage, env: "BUGSNAG_PERFORMANCE_RELEASE_STAGE", default: "production")
61
69
 
70
+ service_env = ENV["BUGSNAG_PERFORMANCE_SERVICE_NAME"]
71
+ @service_name = service_env unless service_env.nil?
72
+ endpoint_env = ENV["BUGSNAG_PERFORMANCE_ENDPOINT"]
73
+ @endpoint = endpoint_env unless endpoint_env.nil?
74
+
62
75
  @enabled_release_stages = fetch(errors_configuration, :enabled_release_stages, env: "BUGSNAG_PERFORMANCE_ENABLED_RELEASE_STAGES")
63
76
 
64
77
  # transform enabled release stages into an array if we read its value from
@@ -15,6 +15,7 @@ module BugsnagPerformance
15
15
  validate_api_key
16
16
  validate_string(:app_version, optional: true)
17
17
  validate_string(:release_stage, optional: true)
18
+ validate_string(:service_name, optional: true)
18
19
  validate_array(:enabled_release_stages, "non-empty strings", optional: true, &method(:valid_string?))
19
20
  valid_endpoint = validate_endpoint
20
21
 
@@ -17,8 +17,7 @@ module BugsnagPerformance
17
17
  def deliver(headers, body)
18
18
  headers = headers.merge(
19
19
  @common_headers,
20
- # TODO - can be restored after https://smartbear.atlassian.net/browse/PIPE-7498
21
- # { "Bugsnag-Sent-At" => Time.now.utc.iso8601(3) },
20
+ { "Bugsnag-Sent-At" => Time.now.utc.iso8601(3) },
22
21
  )
23
22
 
24
23
  raw_response = OpenTelemetry::Common::Utilities.untraced do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BugsnagPerformance
4
- VERSION = "0.3.0"
4
+ VERSION = "1.0.0"
5
5
  SDK_NAME = "Ruby Bugsnag Performance SDK"
6
6
  end
@@ -83,6 +83,11 @@ module BugsnagPerformance
83
83
  otel_configurator.service_version = app_version
84
84
  end
85
85
 
86
+ # set the service name if explicitly set by the user
87
+ if configuration.service_name != nil && configuration.service_name != ""
88
+ otel_configurator.service_name = configuration.service_name
89
+ end
90
+
86
91
  otel_configurator.resource = OpenTelemetry::SDK::Resources::Resource.create(
87
92
  {
88
93
  OpenTelemetry::SemanticConventions::Resource::DEPLOYMENT_ENVIRONMENT => configuration.release_stage,
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: 0.3.0
4
+ version: 1.0.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-11-13 00:00:00.000000000 Z
11
+ date: 2024-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -89,9 +89,11 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".yardopts"
91
91
  - CHANGELOG.md
92
+ - CODEOWNERS
92
93
  - CONTRIBUTING.md
93
94
  - LICENSE.txt
94
95
  - README.md
96
+ - SECURITY.md
95
97
  - TESTING.md
96
98
  - bugsnag-performance.gemspec
97
99
  - lib/bugsnag_performance.rb
@@ -120,7 +122,7 @@ metadata:
120
122
  homepage_uri: https://www.bugsnag.com
121
123
  source_code_uri: https://github.com/bugsnag/bugsnag-ruby-performance
122
124
  bug_tracker_uri: https://github.com/bugsnag/bugsnag-ruby-performance/issues
123
- changelog_uri: https://github.com/bugsnag/bugsnag-ruby-performance/blob/v0.3.0/CHANGELOG.md
125
+ changelog_uri: https://github.com/bugsnag/bugsnag-ruby-performance/blob/v1.0.0/CHANGELOG.md
124
126
  documentation_uri: https://docs.bugsnag.com/performance/integration-guides/ruby/
125
127
  rubygems_mfa_required: 'true'
126
128
  post_install_message: