[{"data":1,"prerenderedAt":745},["ShallowReactive",2],{"\u002Ffeatures\u002Falerting\u002Ferror-monitors-navigation":3,"\u002Ffeatures\u002Falerting\u002Ferror-monitors":134,"alert-names":661},[4,8,28,38,52,70,74,78,88,92,96,100,104,108,112,116],{"title":5,"path":6,"stem":7},"Get started","\u002Ffeatures","features\u002Findex",{"title":9,"closed":10,"path":11,"stem":12,"children":13,"page":-1},"Traces",true,"\u002Ffeatures\u002Ftraces","features\u002F01.traces\u002Findex",[14,16,20,24],{"title":15,"path":11,"stem":12},"Introduction",{"title":17,"path":18,"stem":19},"Grouping & systems","\u002Ffeatures\u002Ftraces\u002Fgrouping","features\u002F01.traces\u002Fgrouping",{"title":21,"path":22,"stem":23},"Querying spans","\u002Ffeatures\u002Ftraces\u002Fquerying-spans","features\u002F01.traces\u002Fquerying-spans",{"title":25,"path":26,"stem":27},"Querying traces","\u002Ffeatures\u002Ftraces\u002Fquerying-traces","features\u002F01.traces\u002Fquerying-traces",{"title":29,"closed":10,"path":30,"stem":31,"children":32,"page":-1},"Logs","\u002Ffeatures\u002Flogs","features\u002F02.logs\u002Findex",[33,34],{"title":15,"path":30,"stem":31},{"title":35,"path":36,"stem":37},"Grouping rules","\u002Ffeatures\u002Flogs\u002Fgrouping","features\u002F02.logs\u002Fgrouping",{"title":39,"closed":10,"path":40,"stem":41,"children":42,"page":-1},"Metrics","\u002Ffeatures\u002Fmetrics","features\u002F03.metrics\u002Findex",[43,44,48],{"title":15,"path":40,"stem":41},{"title":45,"path":46,"stem":47},"Querying","\u002Ffeatures\u002Fmetrics\u002Fquerying","features\u002F03.metrics\u002F02.querying",{"title":49,"path":50,"stem":51},"PromQL compat","\u002Ffeatures\u002Fmetrics\u002Fpromql-compat","features\u002F03.metrics\u002F03.promql-compat",{"title":53,"closed":10,"path":54,"stem":55,"children":56,"page":-1},"Alerting","\u002Ffeatures\u002Falerting","features\u002F04.alerting\u002Findex",[57,58,62,66],{"title":15,"path":54,"stem":55},{"title":59,"path":60,"stem":61},"Error monitors","\u002Ffeatures\u002Falerting\u002Ferror-monitors","features\u002F04.alerting\u002Ferror-monitors",{"title":63,"path":64,"stem":65},"Metric monitors","\u002Ffeatures\u002Falerting\u002Fmetric-monitors","features\u002F04.alerting\u002Fmetric-monitors",{"title":67,"path":68,"stem":69},"Notifications","\u002Ffeatures\u002Falerting\u002Fnotifications","features\u002F04.alerting\u002Fnotifications",{"title":71,"path":72,"stem":73},"Searching","\u002Ffeatures\u002Fsearching","features\u002F04.searching",{"title":75,"path":76,"stem":77},"Chart annotations","\u002Ffeatures\u002Fannotations","features\u002F05.annotations",{"title":79,"path":80,"stem":81,"children":82,"closed":10},"Dashboards","\u002Ffeatures\u002Fdashboards","features\u002F06.dashboards\u002F01.index",[83,84],{"title":79,"path":80,"stem":81},{"title":85,"path":86,"stem":87},"YAML Templates","\u002Ffeatures\u002Fdashboards\u002Fyaml","features\u002F06.dashboards\u002F02.yaml",{"title":89,"path":90,"stem":91},"Transformations","\u002Ffeatures\u002Ftransformations","features\u002F07.transformations",{"title":93,"path":94,"stem":95},"Service graph","\u002Ffeatures\u002Fservice-graph","features\u002F08.service-graph",{"title":97,"path":98,"stem":99},"Grafana integration","\u002Ffeatures\u002Fgrafana","features\u002F09.grafana",{"title":101,"path":102,"stem":103},"Data fixtures","\u002Ffeatures\u002Ffixtures","features\u002F10.fixtures",{"title":105,"path":106,"stem":107},"JavaScript Source Maps","\u002Ffeatures\u002Fsourcemaps","features\u002F11.sourcemaps",{"title":109,"path":110,"stem":111},"MCP Server","\u002Ffeatures\u002Fmcp","features\u002F12.mcp",{"title":113,"path":114,"stem":115},"Observability as Code","\u002Ffeatures\u002Fobservability-as-code","features\u002F13.observability-as-code",{"title":117,"closed":10,"path":118,"stem":119,"children":120,"page":133},"SSO","\u002Ffeatures\u002Fsso","features\u002Fsso",[121,125,129],{"title":122,"path":123,"stem":124},"Google","\u002Ffeatures\u002Fsso\u002Fgoogle","features\u002Fsso\u002F01.google",{"title":126,"path":127,"stem":128},"Okta","\u002Ffeatures\u002Fsso\u002Fokta","features\u002Fsso\u002F02.okta",{"title":130,"path":131,"stem":132},"Keycloak","\u002Ffeatures\u002Fsso\u002Fkeycloak","features\u002Fsso\u002F03.keycloak",false,{"page":135,"surround":656},{"id":136,"title":59,"body":137,"description":645,"extension":646,"image":647,"meta":648,"navigation":10,"path":60,"seo":654,"stem":61,"surround_disabled":133,"__hash__":655},"features\u002Ffeatures\u002F04.alerting\u002Ferror-monitors.md",{"type":138,"value":139,"toc":639},"minimark",[140,144,156,165,170,183,186,190,196,282,287,351,356,419,424,495,499,613,628,632,635],[141,142,143],"p",{},"An error monitor watches incoming log records and fires an alert when a new matching pattern appears. Unlike metric monitors that evaluate aggregates over time, error monitors react to individual events — making them ideal for catching exceptions, fatal errors, and unexpected patterns the moment they occur.",[141,145,146,147,151,152,155],{},"Uptrace automatically creates a default error monitor for logs with ",[148,149,150],"code",{},"ERROR"," and ",[148,153,154],{},"FATAL"," severity. You can customize its filters, add grouping dimensions, or create additional monitors for other patterns.",[157,158,159,160],"video",{"autoPlay":10,"loop":10,"muted":10,"playsInline":10},"\n  ",[161,162],"source",{"src":163,"type":164},"\u002Ffeatures\u002Falerting\u002Falerting-log-errors.mp4","video\u002Fmp4",[166,167,169],"h2",{"id":168},"how-it-works","How it works",[141,171,172,173,177,178,182],{},"When a log record matches the monitor's query, Uptrace checks whether an alert already exists for that pattern. Grouping uses the same ",[174,175,176],"a",{"href":36},"log grouping"," logic as the Logs explorer — similar messages share one alert. If no alert exists, it creates one and sends a notification. If the same pattern fires again, Uptrace uses the ",[174,179,181],{"href":180},"\u002Ffeatures\u002Falerting\u002Fnotifications#notification-frequency","notification frequency"," rules to decide whether to send a reminder.",[141,184,185],{},"When the pattern stops appearing, the alert is automatically closed and a recovery notification is sent.",[166,187,189],{"id":188},"examples","Examples",[141,191,192],{},[193,194,195],"strong",{},"All errors and fatal logs:",[197,198,203],"pre",{"className":199,"code":200,"language":201,"meta":202,"style":202},"language-yaml shiki shiki-themes github-light","monitors:\n  - name: Notify on all errors\n    type: error\n    notify_everyone_by_email: true\n    query:\n      - group by _group_id\n      - where _system in (\"log:error\", \"log:fatal\")\n","yaml","",[148,204,205,218,234,245,257,265,274],{"__ignoreMap":202},[206,207,210,214],"span",{"class":208,"line":209},"line",1,[206,211,213],{"class":212},"shJU0","monitors",[206,215,217],{"class":216},"sgsFI",":\n",[206,219,221,224,227,230],{"class":208,"line":220},2,[206,222,223],{"class":216},"  - ",[206,225,226],{"class":212},"name",[206,228,229],{"class":216},": ",[206,231,233],{"class":232},"sYBdl","Notify on all errors\n",[206,235,237,240,242],{"class":208,"line":236},3,[206,238,239],{"class":212},"    type",[206,241,229],{"class":216},[206,243,244],{"class":232},"error\n",[206,246,248,251,253],{"class":208,"line":247},4,[206,249,250],{"class":212},"    notify_everyone_by_email",[206,252,229],{"class":216},[206,254,256],{"class":255},"sYu0t","true\n",[206,258,260,263],{"class":208,"line":259},5,[206,261,262],{"class":212},"    query",[206,264,217],{"class":216},[206,266,268,271],{"class":208,"line":267},6,[206,269,270],{"class":216},"      - ",[206,272,273],{"class":232},"group by _group_id\n",[206,275,277,279],{"class":208,"line":276},7,[206,278,270],{"class":216},[206,280,281],{"class":232},"where _system in (\"log:error\", \"log:fatal\")\n",[141,283,284],{},[193,285,286],{},"Errors matching a specific message:",[197,288,290],{"className":199,"code":289,"language":201,"meta":202,"style":202},"monitors:\n  - name: Notify on \"timeout\" errors\n    type: error\n    notify_everyone_by_email: true\n    query:\n      - group by _group_id\n      - where _system in (\"log:error\", \"log:fatal\")\n      - where _display_name contains \"timeout\"\n",[148,291,292,298,309,317,325,331,337,343],{"__ignoreMap":202},[206,293,294,296],{"class":208,"line":209},[206,295,213],{"class":212},[206,297,217],{"class":216},[206,299,300,302,304,306],{"class":208,"line":220},[206,301,223],{"class":216},[206,303,226],{"class":212},[206,305,229],{"class":216},[206,307,308],{"class":232},"Notify on \"timeout\" errors\n",[206,310,311,313,315],{"class":208,"line":236},[206,312,239],{"class":212},[206,314,229],{"class":216},[206,316,244],{"class":232},[206,318,319,321,323],{"class":208,"line":247},[206,320,250],{"class":212},[206,322,229],{"class":216},[206,324,256],{"class":255},[206,326,327,329],{"class":208,"line":259},[206,328,262],{"class":212},[206,330,217],{"class":216},[206,332,333,335],{"class":208,"line":267},[206,334,270],{"class":216},[206,336,273],{"class":232},[206,338,339,341],{"class":208,"line":276},[206,340,270],{"class":216},[206,342,281],{"class":232},[206,344,346,348],{"class":208,"line":345},8,[206,347,270],{"class":216},[206,349,350],{"class":232},"where _display_name contains \"timeout\"\n",[141,352,353],{},[193,354,355],{},"Exceptions only:",[197,357,359],{"className":199,"code":358,"language":201,"meta":202,"style":202},"monitors:\n  - name: Exceptions\n    type: error\n    notify_everyone_by_email: true\n    query:\n      - group by _group_id\n      - where _system in (\"log:error\", \"log:fatal\")\n      - where exception_type exists\n",[148,360,361,367,378,386,394,400,406,412],{"__ignoreMap":202},[206,362,363,365],{"class":208,"line":209},[206,364,213],{"class":212},[206,366,217],{"class":216},[206,368,369,371,373,375],{"class":208,"line":220},[206,370,223],{"class":216},[206,372,226],{"class":212},[206,374,229],{"class":216},[206,376,377],{"class":232},"Exceptions\n",[206,379,380,382,384],{"class":208,"line":236},[206,381,239],{"class":212},[206,383,229],{"class":216},[206,385,244],{"class":232},[206,387,388,390,392],{"class":208,"line":247},[206,389,250],{"class":212},[206,391,229],{"class":216},[206,393,256],{"class":255},[206,395,396,398],{"class":208,"line":259},[206,397,262],{"class":212},[206,399,217],{"class":216},[206,401,402,404],{"class":208,"line":267},[206,403,270],{"class":216},[206,405,273],{"class":232},[206,407,408,410],{"class":208,"line":276},[206,409,270],{"class":216},[206,411,281],{"class":232},[206,413,414,416],{"class":208,"line":345},[206,415,270],{"class":216},[206,417,418],{"class":232},"where exception_type exists\n",[141,420,421],{},[193,422,423],{},"All environments except dev:",[197,425,427],{"className":199,"code":426,"language":201,"meta":202,"style":202},"monitors:\n  - name: Notify on all errors except in \"dev\" environment\n    type: error\n    notify_everyone_by_email: true\n    query:\n      - group by _group_id\n      - group by deployment_environment\n      - where _system in (\"log:error\", \"log:fatal\")\n      - where deployment_environment != \"dev\"\n",[148,428,429,435,446,454,462,468,474,481,487],{"__ignoreMap":202},[206,430,431,433],{"class":208,"line":209},[206,432,213],{"class":212},[206,434,217],{"class":216},[206,436,437,439,441,443],{"class":208,"line":220},[206,438,223],{"class":216},[206,440,226],{"class":212},[206,442,229],{"class":216},[206,444,445],{"class":232},"Notify on all errors except in \"dev\" environment\n",[206,447,448,450,452],{"class":208,"line":236},[206,449,239],{"class":212},[206,451,229],{"class":216},[206,453,244],{"class":232},[206,455,456,458,460],{"class":208,"line":247},[206,457,250],{"class":212},[206,459,229],{"class":216},[206,461,256],{"class":255},[206,463,464,466],{"class":208,"line":259},[206,465,262],{"class":212},[206,467,217],{"class":216},[206,469,470,472],{"class":208,"line":267},[206,471,270],{"class":216},[206,473,273],{"class":232},[206,475,476,478],{"class":208,"line":276},[206,477,270],{"class":216},[206,479,480],{"class":232},"group by deployment_environment\n",[206,482,483,485],{"class":208,"line":345},[206,484,270],{"class":216},[206,486,281],{"class":232},[206,488,490,492],{"class":208,"line":489},9,[206,491,270],{"class":216},[206,493,494],{"class":232},"where deployment_environment != \"dev\"\n",[166,496,498],{"id":497},"query-attributes","Query attributes",[500,501,502,515],"table",{},[503,504,505],"thead",{},[506,507,508,512],"tr",{},[509,510,511],"th",{},"Attribute",[509,513,514],{},"Description",[516,517,518,533,547,568,582,603],"tbody",{},[506,519,520,526],{},[521,522,523],"td",{},[148,524,525],{},"_group_id",[521,527,528,529,532],{},"Groups similar log records together. Use ",[148,530,531],{},"group by _group_id"," to create one alert per unique error pattern.",[506,534,535,540],{},[521,536,537],{},[148,538,539],{},"_display_name",[521,541,542,543,546],{},"The log message or exception message. Use ",[148,544,545],{},"contains"," to match a substring.",[506,548,549,554],{},[521,550,551],{},[148,552,553],{},"_system",[521,555,556,557,560,561,560,564,567],{},"The signal type: ",[148,558,559],{},"log:error",", ",[148,562,563],{},"log:fatal",[148,565,566],{},"log:warn",", etc.",[506,569,570,575],{},[521,571,572],{},[148,573,574],{},"exception_type",[521,576,577,578,581],{},"Set on log records that carry an exception. Use ",[148,579,580],{},"exists"," to filter exception-only logs.",[506,583,584,589],{},[521,585,586],{},[148,587,588],{},"deployment_environment",[521,590,591,592,560,595,598,599,602],{},"The environment attribute, typically ",[148,593,594],{},"prod",[148,596,597],{},"staging",", or ",[148,600,601],{},"dev",".",[506,604,605,610],{},[521,606,607],{},[148,608,609],{},"service_name",[521,611,612],{},"The service that emitted the log.",[141,614,615,616,620,621,151,624,627],{},"Any ",[174,617,619],{"href":618},"\u002Fopentelemetry\u002Fsemconv","indexed span attribute"," can be used in ",[148,622,623],{},"where",[148,625,626],{},"group by"," clauses.",[166,629,631],{"id":630},"alert-names","Alert names",[633,634],"partial",{"path":630},[636,637,638],"style",{},"html pre.shiki code .shJU0, html code.shiki .shJU0{--shiki-default:#22863A}html pre.shiki code .sgsFI, html code.shiki .sgsFI{--shiki-default:#24292E}html pre.shiki code .sYBdl, html code.shiki .sYBdl{--shiki-default:#032F62}html pre.shiki code .sYu0t, html code.shiki .sYu0t{--shiki-default:#005CC5}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":202,"searchDepth":247,"depth":220,"links":640},[641,642,643,644],{"id":168,"depth":220,"text":169},{"id":188,"depth":220,"text":189},{"id":497,"depth":220,"text":498},{"id":630,"depth":220,"text":631},"Set up error monitors in Uptrace to receive alerts for specific log patterns, exception types, and severity levels. Customize alert names with Go templates.","md",null,{"readingTime":649},{"text":650,"minutes":651,"time":652,"words":653},"2 min read",1.665,99900,333,{"title":59,"description":645},"tNSDhiXyTBKAyrDdcYbdAhR1XKIbIWQCDY5HUxD56JM",[657,659],{"title":15,"path":54,"stem":55,"description":658,"children":-1},"Configure metric and error monitors in Uptrace to track infrastructure health, span latency, error rates, and log patterns. Get notified via Slack, PagerDuty, Teams, and more.",{"title":63,"path":64,"stem":65,"description":660,"children":-1},"Create metric monitors in Uptrace to alert on CPU, disk, network, span latency, error rates, and log volume using YAML-defined thresholds and rolling evaluation windows.",{"id":662,"title":663,"body":664,"description":668,"extension":646,"meta":735,"navigation":10,"path":741,"seo":742,"stem":743,"__hash__":744},"partials\u002Fpartials\u002F_alert-names.md","Alert Names",{"type":138,"value":665,"toc":733},[666,669,672,679,682],[141,667,668],{},"For metric monitors, Uptrace generates alert names using the monitor name and timeseries name, for example, \"Disk usage: myhost+mydisk\".",[141,670,671],{},"For error monitors, Uptrace generates alert names using the error (log) message, for example, \"ERROR *fmt.wrapError: writeError failed\".",[141,673,674,675,678],{},"You can customize alert names by specifying a Go template string as the monitor name when creating a monitor, for example, ",[148,676,677],{},"{{ .Attrs.deployment_environment_name }}: {{ .DisplayName }}"," will prefix the alert name with the deployment environment attribute.",[141,680,681],{},"You can use the following variables in templates:",[500,683,684,696],{},[503,685,686],{},[506,687,688,691,694],{},[509,689,690],{},"Variable",[509,692,693],{},"Type",[509,695,514],{},[516,697,698,714],{},[506,699,700,705,708],{},[521,701,702],{},[148,703,704],{},"{{ .DisplayName }}",[521,706,707],{},"string",[521,709,710,711,713],{},"Same as ",[148,712,539],{}," when querying spans and logs.",[506,715,716,721,727],{},[521,717,718],{},[148,719,720],{},"{{ .Attrs }}",[521,722,723,724,726],{},"map",[206,725,707],{},"any",[521,728,729,730,602],{},"All available attributes, for example, ",[148,731,732],{},"{{ .Attrs.service_name }}",{"title":202,"searchDepth":247,"depth":220,"links":734},[],{"readingTime":736},{"text":737,"minutes":738,"time":739,"words":740},"1 min read",0.42,25200,84,"\u002Fpartials\u002F_alert-names",{"description":668},"partials\u002F_alert-names","U_e2fG6gbH6x_mGZ1iQPmIxCoRqQUzr7DgbSDN50a58",1780666755220]