Created
June 3, 2025 16:22
-
-
Save lioneltchami/76c6e2a745ef0feca5dec13efc1c3f13 to your computer and use it in GitHub Desktop.
π Metric #2: Application Error Rate via X-Ray Traces. Use X-Ray segment annotations for a custom error rate metric (you would emit this yourself via PutMetricData):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "awscc_applicationsignals_service_level_objective" "app_error_rate" { | |
name = "app-error-rate-slo" | |
description = "Application error rate derived from X-Ray segments" | |
sli = { | |
comparison_operator = "LessThan" | |
metric_threshold = 1.0 # <1% errors | |
sli_metric = { | |
metric_data_queries = [{ | |
id = "errorrate" | |
metric_stat = { | |
metric = { | |
namespace = "MyApp/XRay" | |
metric_name = "ErrorRate" | |
dimensions = [ | |
{ | |
name = "ServiceName" | |
value = "MyFargateService" | |
} | |
] | |
} | |
period = 300 | |
stat = "Average" | |
} | |
}] | |
} | |
} | |
goal = { | |
attainment_goal = 99.0 | |
interval = { | |
rolling_interval = { | |
duration = 7 | |
duration_unit = "DAY" | |
} | |
} | |
} | |
burn_rate_configurations = [ | |
{ look_back_window_minutes = 60 }, | |
{ look_back_window_minutes = 1440 } | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment