Skip to content

Commit 847ea9e

Browse files
authored
Merge pull request #230 from bugsnag/release/v3.8.0
V3.8.0 Release
2 parents 8663402 + 17f393b commit 847ea9e

24 files changed

+297
-227
lines changed

.buildkite/pipeline.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,37 @@ steps:
7373
command:
7474
- 'features/scripts/assemble-fixtures.sh'
7575
- 'bundle exec maze-runner --exclude=features/[^n-z].*.feature'
76+
77+
# If this is the 'main' branch activate a manual publishing step
78+
79+
- block: 'Trigger package publish'
80+
if: build.branch == "main"
81+
key: trigger-publish
82+
blocked_state: passed
83+
84+
- label: ':docker: Build Java base image'
85+
if: build.branch == "main"
86+
key: 'java-common'
87+
timeout_in_minutes: 30
88+
depends_on: 'trigger-publish'
89+
plugins:
90+
- docker-compose#v4.7.0:
91+
build:
92+
- java-common
93+
image-repository: 855461928731.dkr.ecr.us-west-1.amazonaws.com/android
94+
cache-from:
95+
- java-common:855461928731.dkr.ecr.us-west-1.amazonaws.com/android:java-release
96+
- docker-compose#v4.7.0:
97+
push:
98+
- java-common:855461928731.dkr.ecr.us-west-1.amazonaws.com/android:java-release
99+
100+
- label: 'Publish :rocket:'
101+
if: build.branch == "main"
102+
depends_on: 'java-common'
103+
timeout_in_minutes: 30
104+
env:
105+
BUILDKITE_PLUGIN_S3_SECRETS_BUCKET_PREFIX: bugsnag-android-publish
106+
plugins:
107+
docker-compose#v4.7.0:
108+
no-cache: true
109+
run: java-publisher

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
build/
33
*.iml
44
out/
5+
Gemfile.lock
56
#
67
# Common IDE files
78
#

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.5
1+
3.3.0

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 3.8.0 - 2025-07-17
4+
5+
* Set default endpoints based on API key [#227](https://github.com/bugsnag/bugsnag-java/pull/227)
6+
37
## 3.7.2 (2024-08-28)
48

59
### Changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
source 'https://rubygems.org'
22

3-
gem 'bugsnag-maze-runner', git: 'https://github.com/bugsnag/maze-runner', tag: 'v7.24.0'
3+
gem 'bugsnag-maze-runner', '~>9.0'
44
gem 'os'

Gemfile.lock

Lines changed: 0 additions & 134 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ endif
66
@sed -i '' "s/version=.*/version=$(VERSION)/" gradle.properties
77
@sed -i '' "s/NOTIFIER_VERSION = .*;/NOTIFIER_VERSION = \"$(VERSION)\";/"\
88
bugsnag/src/main/java/com/bugsnag/Notifier.java
9+
@sed -i '' "s/## TBD/## $(VERSION) - $(shell date +%Y-%m-%d)/" CHANGELOG.md
910

bugsnag/src/main/java/com/bugsnag/Bugsnag.java

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ public Thread newThread(Runnable runnable) {
4747

4848
private ScheduledThreadPoolExecutor sessionExecutorService =
4949
new ScheduledThreadPoolExecutor(CORE_POOL_SIZE,
50-
new DaemonThreadFactory(),
51-
new RejectedExecutionHandler() {
50+
new DaemonThreadFactory(),
51+
new RejectedExecutionHandler() {
5252
@Override
5353
public void rejectedExecution(Runnable runnable, ThreadPoolExecutor executor) {
5454
LOGGER.error("Rejected execution for sessionExecutorService");
@@ -436,14 +436,14 @@ public boolean notify(Report report, Callback reportCallback) {
436436
// Don't notify if this error class should be ignored
437437
if (config.shouldIgnoreClass(report.getExceptionName())) {
438438
LOGGER.debug("Error not reported to Bugsnag - {} is in 'ignoreClasses'",
439-
report.getExceptionName());
439+
report.getExceptionName());
440440
return false;
441441
}
442442

443443
// Don't notify unless releaseStage is in notifyReleaseStages
444444
if (!config.shouldNotifyForReleaseStage()) {
445445
LOGGER.debug("Error not reported to Bugsnag - {} is not in 'notifyReleaseStages'",
446-
config.releaseStage);
446+
config.releaseStage);
447447
return false;
448448
}
449449

@@ -456,7 +456,7 @@ public boolean notify(Report report, Callback reportCallback) {
456456
// Check if callback cancelled delivery
457457
if (report.getShouldCancel()) {
458458
LOGGER.debug("Error not reported to Bugsnag - "
459-
+ "cancelled by a client-wide beforeNotify callback");
459+
+ "cancelled by a client-wide beforeNotify callback");
460460
return false;
461461
}
462462
} catch (Throwable ex) {
@@ -476,7 +476,7 @@ public boolean notify(Report report, Callback reportCallback) {
476476
// Check if callback cancelled delivery
477477
if (report.getShouldCancel()) {
478478
LOGGER.debug(
479-
"Error not reported to Bugsnag - cancelled by a report-specific callback");
479+
"Error not reported to Bugsnag - cancelled by a report-specific callback");
480480
return false;
481481
}
482482
} catch (Throwable ex) {
@@ -514,11 +514,11 @@ public boolean notify(Report report, Callback reportCallback) {
514514

515515
/**
516516
* Manually starts tracking a new session.
517-
*
517+
* <p>
518518
* Note: sessions are currently tracked on a per-thread basis. Therefore, if this method were
519519
* called from Thread A then Thread B, two sessions would be considered 'active'. Any custom
520520
* strategy used to track sessions should take this into account.
521-
*
521+
* <p>
522522
* Automatic session tracking can be enabled via
523523
* {@link Bugsnag#setAutoCaptureSessions(boolean)}, which will automatically create a new
524524
* session for each request
@@ -542,6 +542,7 @@ public void setAutoCaptureSessions(boolean autoCaptureSessions) {
542542
/**
543543
* Retrieves whether or not Bugsnag should automatically capture
544544
* and report User sessions for each request.
545+
*
545546
* @return whether sessions should be auto captured
546547
*/
547548
public boolean shouldAutoCaptureSessions() {
@@ -564,24 +565,29 @@ public void setSessionEndpoint(String endpoint) {
564565
}
565566

566567
/**
567-
* Set the endpoints to send data to. By default we'll send error reports to
568-
* https://notify.bugsnag.com, and sessions to https://sessions.bugsnag.com, but you can
569-
* override this if you are using Bugsnag Enterprise to point to your own Bugsnag endpoint.
570-
*
568+
* @deprecated Use {@link #setEndpoints(EndpointConfiguration)} instead.
569+
*/
570+
@Deprecated
571+
public void setEndpoints(String notify, String sessions) throws IllegalArgumentException {
572+
setEndpoints(new EndpointConfiguration(notify, sessions));
573+
}
574+
575+
/**
576+
* Set the endpoints to send data to. Use this to override the default endpoints
577+
* if you are using Bugsnag Enterprise to point to your own Bugsnag endpoint.
578+
* <p>
571579
* Please note that it is recommended that you set both endpoints. If the notify endpoint is
572580
* missing, an exception will be thrown. If the session endpoint is missing, a warning will be
573581
* logged and sessions will not be sent automatically.
574-
*
582+
* <p>
575583
* Note that if you are setting a custom {@link Delivery}, this method should be called after
576584
* the custom implementation has been set.
577585
*
578-
* @param notify the notify endpoint
579-
* @param sessions the sessions endpoint
580-
*
581-
* @throws IllegalArgumentException if the notify endpoint is empty or null
586+
* @param endpointConfiguration the endpoint configuration
587+
* @throws IllegalArgumentException if the endpoint configuration is null or if the notify endpoint is empty or null
582588
*/
583-
public void setEndpoints(String notify, String sessions) throws IllegalArgumentException {
584-
config.setEndpoints(notify, sessions);
589+
public void setEndpoints(EndpointConfiguration endpointConfiguration) throws IllegalArgumentException {
590+
config.setEndpoints(endpointConfiguration);
585591
}
586592

587593
/**

bugsnag/src/main/java/com/bugsnag/BugsnagAppender.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ private Bugsnag createBugsnag() {
236236
}
237237

238238
if (endpoint != null) {
239-
bugsnag.setEndpoints(endpoint, null);
239+
bugsnag.setEndpoints(new EndpointConfiguration(endpoint, ""));
240240
}
241241

242242
if (proxy != null) {
@@ -369,7 +369,7 @@ public void setEndpoint(String endpoint) {
369369
this.endpoint = endpoint;
370370

371371
if (bugsnag != null) {
372-
bugsnag.setEndpoints(endpoint, null);
372+
bugsnag.setEndpoints(new EndpointConfiguration(endpoint, ""));
373373
}
374374
}
375375

0 commit comments

Comments
 (0)