Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed TimeZone naming in MonitorConfig #3403

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 int? RecoveryThreshold
/// <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
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
Loading