Skip to content

Commit 6335aff

Browse files
authored
Amend secondary instance URL to bugsnag.smartbear.com (#207)
1 parent 5cf14d0 commit 6335aff

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

BugsnagPerformance/Assets/BugsnagPerformance/Scripts/Public/PerformanceConfiguration.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class PerformanceConfiguration
2121

2222
private const string LEGACY_DEFAULT_ENDPOINT = "https://otlp.bugsnag.com/v1/traces";
2323
private const string DEFAULT_ENDPOINT = "https://{0}.otlp.bugsnag.com/v1/traces";
24-
private const string HUB_ENDPOINT = "https://{0}.otlp.insighthub.smartbear.com/v1/traces";
24+
private const string SECONDARY_URL_FORMAT = "https://{0}.otlp.bugsnag.smartbear.com/v1/traces";
2525
private const string HUB_API_PREFIX = "00000";
2626

2727
internal const int DEFAULT_ATTRIBUTE_STRING_VALUE_LIMIT = 1024;
@@ -157,15 +157,15 @@ internal List<Func<Span, bool>> GetOnSpanEndCallbacks()
157157
internal bool IsFixedSamplingProbability => SamplingProbability >= 0;
158158

159159
public string ServiceName = string.Empty;
160-
private bool IsHubApiKey(string apiKey)
160+
private bool IsSecondaryApiKey(string apiKey)
161161
{
162162
return !string.IsNullOrEmpty(apiKey) && apiKey.StartsWith(HUB_API_PREFIX);
163163
}
164164
public string GetEndpoint()
165165
{
166166
if (string.IsNullOrEmpty(Endpoint) || Endpoint == LEGACY_DEFAULT_ENDPOINT)
167167
{
168-
return string.Format(IsHubApiKey(ApiKey) ? HUB_ENDPOINT : DEFAULT_ENDPOINT, ApiKey);
168+
return string.Format(IsSecondaryApiKey(ApiKey) ? SECONDARY_URL_FORMAT : DEFAULT_ENDPOINT, ApiKey);
169169
}
170170
return Endpoint;
171171
}

BugsnagPerformance/Assets/UnitTests/ConfigurationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class ConfigurationTests
1616
private const string HUB_API_KEY = "00000abcdef1234567890abcdef12345";
1717
private const string LEGACY_DEFAULT_ENDPOINT = "https://otlp.bugsnag.com/v1/traces";
1818
private const string DEFAULT_ENDPOINT = "https://{0}.otlp.bugsnag.com/v1/traces";
19-
private const string HUB_ENDPOINT = "https://{0}.otlp.insighthub.smartbear.com/v1/traces";
19+
private const string SECONDARY_URL_FORMAT = "https://{0}.otlp.bugsnag.smartbear.com/v1/traces";
2020
private DateTimeOffset CustomStartTime = new DateTimeOffset(1985, 1, 1, 1, 1, 1, System.TimeSpan.Zero);
2121
private DateTimeOffset CustomEndTime = new DateTimeOffset(1986, 1, 1, 1, 1, 1, System.TimeSpan.Zero);
2222

@@ -45,7 +45,7 @@ public void GetEndpoint_IgnoresLegacyConstant_WhenExplicitlyAssigned()
4545
public void GetEndpoint_UsesHubDomain_WhenApiKeyStartsWith00000()
4646
{
4747
var cfg = new PerformanceConfiguration(HUB_API_KEY);
48-
var expected = string.Format(HUB_ENDPOINT, HUB_API_KEY);
48+
var expected = string.Format(SECONDARY_URL_FORMAT, HUB_API_KEY);
4949
Assert.That(cfg.GetEndpoint(), Is.EqualTo(expected));
5050
}
5151

CHANGELOG.md

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

3+
## TBD
4+
5+
### Misc
6+
7+
- Amend secondary instance URL to bugsnag.smartbear.com [#207](https://github.com/bugsnag/bugsnag-unity-performance/pull/207)
8+
39
## v1.11.0 (2025-09-03)
410

511
### Additions

0 commit comments

Comments
 (0)