Skip to content

Commit

Permalink
fix: Fixed TimeZone naming in MonitorConfig (#3403)
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsandfoxes committed Jun 4, 2024
1 parent 5659e2f commit aa60fc1
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Sentry/SentryMonitorOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void Interval(int interval, SentryMonitorInterval unit)
/// <summary>
/// A tz database string representing the timezone which the monitor's execution schedule is in (i.e. "America/Los_Angeles").
/// </summary>
public string? Timezone { get; set; }
public string? TimeZone { get; set; }

/// <summary>
/// An actor identifier string. This looks like 'user:john@example.com team:a-sentry-team'. IDs can also be used but will result in a poor DX.
Expand Down Expand Up @@ -206,7 +206,7 @@ public void WriteTo(Utf8JsonWriter writer, IDiagnosticLogger? logger)
writer.WriteNumberIfNotNull("max_runtime", MaxRuntime?.TotalMinutes);
writer.WriteNumberIfNotNull("failure_issue_threshold", FailureIssueThreshold);
writer.WriteNumberIfNotNull("recovery_threshold", RecoveryThreshold);
writer.WriteStringIfNotWhiteSpace("timezone", Timezone);
writer.WriteStringIfNotWhiteSpace("timezone", TimeZone);
writer.WriteStringIfNotWhiteSpace("owner", Owner);

writer.WriteEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ namespace Sentry
public System.TimeSpan? MaxRuntime { get; set; }
public string? Owner { get; set; }
public int? RecoveryThreshold { get; set; }
public string? Timezone { get; set; }
public string? TimeZone { get; set; }
public void Interval(string crontab) { }
public void Interval(int interval, Sentry.SentryMonitorInterval unit) { }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ namespace Sentry
public System.TimeSpan? MaxRuntime { get; set; }
public string? Owner { get; set; }
public int? RecoveryThreshold { get; set; }
public string? Timezone { get; set; }
public string? TimeZone { get; set; }
public void Interval(string crontab) { }
public void Interval(int interval, Sentry.SentryMonitorInterval unit) { }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ namespace Sentry
public System.TimeSpan? MaxRuntime { get; set; }
public string? Owner { get; set; }
public int? RecoveryThreshold { get; set; }
public string? Timezone { get; set; }
public string? TimeZone { get; set; }
public void Interval(string crontab) { }
public void Interval(int interval, Sentry.SentryMonitorInterval unit) { }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
Expand Down
2 changes: 1 addition & 1 deletion test/Sentry.Tests/ApiApprovalTests.Run.Net4_8.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ namespace Sentry
public System.TimeSpan? MaxRuntime { get; set; }
public string? Owner { get; set; }
public int? RecoveryThreshold { get; set; }
public string? Timezone { get; set; }
public string? TimeZone { get; set; }
public void Interval(string crontab) { }
public void Interval(int interval, Sentry.SentryMonitorInterval unit) { }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer, Sentry.Extensibility.IDiagnosticLogger? logger) { }
Expand Down
6 changes: 3 additions & 3 deletions test/Sentry.Tests/SentryClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,7 @@ public void CaptureCheckIn_CheckInOptionsProvided_CheckInHasOptions()
MaxRuntime = TimeSpan.FromMinutes(1),
FailureIssueThreshold = 1,
RecoveryThreshold = 1,
Timezone = "America/Los_Angeles",
TimeZone = "America/Los_Angeles",
Owner = "test-owner"
};

Expand All @@ -1314,7 +1314,7 @@ public void CaptureCheckIn_CheckInOptionsProvided_CheckInHasOptions()
options.MaxRuntime = monitorOptions.MaxRuntime;
options.FailureIssueThreshold = monitorOptions.FailureIssueThreshold;
options.RecoveryThreshold = monitorOptions.RecoveryThreshold;
options.Timezone = monitorOptions.Timezone;
options.TimeZone = monitorOptions.TimeZone;
options.Owner = monitorOptions.Owner;
});

Expand All @@ -1325,7 +1325,7 @@ public void CaptureCheckIn_CheckInOptionsProvided_CheckInHasOptions()
Assert.Equal(actualCheckIn.MonitorOptions.MaxRuntime, monitorOptions.MaxRuntime);
Assert.Equal(actualCheckIn.MonitorOptions.FailureIssueThreshold, monitorOptions.FailureIssueThreshold);
Assert.Equal(actualCheckIn.MonitorOptions.RecoveryThreshold, monitorOptions.RecoveryThreshold);
Assert.Equal(actualCheckIn.MonitorOptions.Timezone, monitorOptions.Timezone);
Assert.Equal(actualCheckIn.MonitorOptions.TimeZone, monitorOptions.TimeZone);
Assert.Equal(actualCheckIn.MonitorOptions.Owner, monitorOptions.Owner);
}

Expand Down

0 comments on commit aa60fc1

Please sign in to comment.