[{"data":1,"prerenderedAt":844},["ShallowReactive",2],{"docs-pages-en":3,"doc-en-recipe-payment-alert":339},[4,9,15,20,25,30,35,41,52,60,69,77,84,92,96,105,109,117,122,127,132,138,143,148,153,158,163,168,174,179,184,189,194,200,205,210,215,220,225,230,235,240,245,250,255,260,265,270,275,280,285,291,296,300,304,309,314,319,324,329,334],{"path":5,"title":6,"description":7,"order":8,"group":8,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fpermissions","Who can do what","[object Object]",null,{"path":10,"title":11,"description":12,"order":13,"group":14,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Finstallation","Installation","Install CloseYourIt on your own server with one command.",1,"start",{"path":16,"title":17,"description":18,"order":19,"group":14,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fsettings","Settings","Every setting in the .env file, what it does and which ones you must never change.",2,{"path":21,"title":22,"description":23,"order":24,"group":14,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fdatabase","Database","What the database is, what is inside, how long data stays and how much room it takes.",3,{"path":26,"title":27,"description":28,"order":29,"group":14,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fupdates-and-backups","Updates and backups","Update to a new version, back up and restore the database, check the install.",4,{"path":31,"title":32,"description":33,"order":34,"group":14,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Ftroubleshooting","Troubleshooting","What to check when the install, the certificate, email or incoming data do not work.",5,{"path":36,"title":37,"description":38,"order":39,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fconnect-your-apps","Connect your apps","Every tool that sends data to CloseYourIt, and what each one collects.",6,"connect",{"path":42,"title":43,"description":44,"order":45,"group":8,"parent":46,"package":47,"note":48,"collects":49,"status":8},"\u002Fdocs\u002Fsdk-ruby","Ruby \u002F Rails","The closeyourit-ruby gem sends errors, logs, slow queries and job metrics from a Rails app.",7,"connect-your-apps","closeyourit-ruby","Errors, logs, slow queries and methods, background jobs.",{"errors":50,"logs":50,"performance":50,"visits":51,"servers":51},"full","none",{"path":53,"title":54,"description":55,"order":56,"group":8,"parent":46,"package":57,"note":58,"collects":59,"status":8},"\u002Fdocs\u002Fsdk-javascript","JavaScript","The @bussolabs\u002Fcloseyourit-js package works in the browser and on Node 20.16 or newer.",8,"@bussolabs\u002Fcloseyourit-js","Browser and Node, framework adapters and database queries from 0.13.0.",{"errors":50,"logs":50,"performance":50,"visits":50,"servers":51},{"path":61,"title":62,"description":63,"order":64,"group":8,"parent":46,"package":65,"note":66,"collects":67,"status":8},"\u002Fdocs\u002Fsdk-dart","Dart \u002F Flutter","The closeyourit package captures the errors of Flutter apps, even when the phone is offline.",9,"closeyourit","Public errors, logs and metrics from 0.9.3.",{"errors":50,"logs":68,"performance":68,"visits":51,"servers":51},"partial",{"path":70,"title":71,"description":72,"order":73,"group":8,"parent":46,"package":65,"note":74,"collects":75,"status":76},"\u002Fdocs\u002Fsdk-python","Python","The closeyourit package sends errors, logs and metrics from server-side Python applications.",10,"Server side. SQLAlchemy; Django query monitoring and FastAPI\u002FStarlette from 0.4.0.",{"errors":50,"logs":50,"performance":68,"visits":51,"servers":51},"pre_alpha",{"path":78,"title":79,"description":80,"order":81,"group":8,"parent":46,"package":79,"note":82,"collects":83,"status":8},"\u002Fdocs\u002Fsdk-sentry","Sentry SDK","Send errors with a compatible Sentry SDK; sessions and crashes have separate profiles.",11,"Compatible errors; sessions and crashes require a verified profile.",{"errors":50,"logs":51,"performance":51,"visits":51,"servers":51},{"path":85,"title":86,"description":87,"order":88,"group":8,"parent":46,"package":89,"note":90,"collects":91,"status":8},"\u002Fdocs\u002Fagent-server","Server agent","A small program on the server that sends the state of the machine every 60 seconds.",12,"closeyourit-agent","CPU, memory, disks, network, containers and services.",{"errors":51,"logs":68,"performance":51,"visits":51,"servers":50},{"path":93,"title":94,"description":95,"order":88,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fnuxt","Vue and Nuxt","Connect Nuxt browser errors and Nitro server errors without exposing a server token.",{"path":97,"title":98,"description":99,"order":100,"group":8,"parent":46,"package":101,"note":102,"collects":103,"status":104},"\u002Fdocs\u002Fagent-kubernetes","Kubernetes","A read-only observer of the cluster: one copy per cluster.",13,"closeyourit-kube","Machines, apps and error events of the cluster.",{"errors":51,"logs":51,"performance":51,"visits":51,"servers":50},"coming",{"path":106,"title":107,"description":108,"order":100,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fopentelemetry","OpenTelemetry","Send server traces, metrics and logs through the optional OTLP receiver.",{"path":110,"title":111,"description":112,"order":113,"group":8,"parent":46,"package":114,"note":115,"collects":116,"status":8},"\u002Fdocs\u002Fcli","cyi CLI","The closeyourit command, cyi for short: manage projects, errors and tickets from the terminal.",14,"@bussolabs\u002Fcloseyourit-cli","It collects no data: it drives CloseYourIt from the terminal.",{"errors":51,"logs":51,"performance":51,"visits":51,"servers":51},{"path":118,"title":119,"description":120,"order":121,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fhttp-api","HTTP API","Send errors, logs, metrics and page views with plain HTTP requests, without an SDK.",15,{"path":123,"title":124,"description":125,"order":126,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fgithub-app","GitHub","Connect GitHub repositories to tickets and releases with your own GitHub App.",16,{"path":128,"title":129,"description":130,"order":131,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fingest-gateway","Ingest gateway","Keep incoming errors, logs and metrics safe when the app is slow or restarting.",17,{"path":133,"title":134,"description":135,"order":136,"group":137,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fai","AI","Turn on assistant, analysis, dictation and smart search with a CloseYourIt AI key or your own provider.",18,"automation",{"path":139,"title":140,"description":141,"order":142,"group":137,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fautomator","Automator","Let tickets be worked automatically on your own Linux machine, with Claude Code, Codex or both.",19,{"path":144,"title":145,"description":146,"order":147,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fstack-coverage","Frameworks and stack coverage","Choose a published SDK or understand the limits of a locally tested integration.",20,{"path":149,"title":150,"description":151,"order":152,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fmonitoring","Traces, measurements and sessions","Explore the new signals, compare releases and recover original error locations.",21,{"path":154,"title":155,"description":156,"order":157,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fnode-database","Node databases","Monitor slow and repeated queries with pg, mysql2, Drizzle and Prisma PostgreSQL.",22,{"path":159,"title":160,"description":161,"order":162,"group":137,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fclaude-code","Claude Code","CloseYourIt inside Claude Code, in a column next to the conversation with production and your open tickets.",23,{"path":164,"title":165,"description":166,"order":167,"group":40,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fcollected-data","Data the SDKs send","For each SDK, what it sends on its own, what only when you turn it on, and what never leaves your app.",24,{"path":169,"title":170,"description":171,"order":172,"group":173,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Frecipes","Recipes","Four guides from start to finish, each one crossing several parts of CloseYourIt.",25,"recipes",{"path":175,"title":176,"description":177,"order":178,"group":8,"parent":173,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Frecipe-payment-alert","A Telegram alert when a payment fails","Your Rails app writes the failed payment, and the message reaches you in a Telegram chat.",26,{"path":180,"title":181,"description":182,"order":183,"group":8,"parent":173,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Frecipe-error-to-agent","From an error to a ticket worked by an agent","A browser error becomes a ticket, and an agent on your machine proposes the fix for you to approve.",27,{"path":185,"title":186,"description":187,"order":188,"group":8,"parent":173,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Frecipe-status-page","Site checks with a public status page","CloseYourIt checks that your site answers, alerts you when it falls and shows the status to your customers.",28,{"path":190,"title":191,"description":192,"order":193,"group":8,"parent":173,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Frecipe-request-logs","Logs tied to the same request","The messages of your Rails app line up with the error they explain, request by request.",29,{"path":195,"title":196,"description":197,"order":198,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Ftickets","Tickets and ideas","Open and follow tickets on the board, group them into milestones, ask questions and turn voted ideas into work.",30,"use",{"path":201,"title":202,"description":203,"order":204,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Ferrors","Errors","How your apps' errors become single rows, and how to resolve, ignore, merge or turn them into tickets.",31,{"path":206,"title":207,"description":208,"order":209,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fperformance","Performance","Find slow queries and methods, read the problems detected automatically and get an alert when one appears.",32,{"path":211,"title":212,"description":213,"order":214,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Flogs","Logs","Search your apps' messages, follow a request from start to end and link a message to an error or a ticket.",33,{"path":216,"title":217,"description":218,"order":219,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fsecrets","Secrets","Passwords, keys and private files in one place, per project and environment, read by your app without a .env on disk.",34,{"path":221,"title":222,"description":223,"order":224,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fservers","Servers","The state of your machines on one page, with history and alerts when something breaks or fills up.",35,{"path":226,"title":227,"description":228,"order":229,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fuptime","Uptime","Check that your sites answer, keep count of outages and show them to customers on a status page.",36,{"path":231,"title":232,"description":233,"order":234,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fcrons","Scheduled jobs","Notice when a job that should run on its own stops running, or runs and ends badly.",37,{"path":236,"title":237,"description":238,"order":239,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Falerts","Alerts","The rules that create an alert, the notification center and where each person chooses to receive them.",38,{"path":241,"title":242,"description":243,"order":244,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fhelpdesk","Help desk","Visitors of a project's site write to the team with the \"Need help?\" button, and the request lands in the right project.",39,{"path":246,"title":247,"description":248,"order":249,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fanalytics","Site analytics","How many people visit the site, what they look at and where they come from, without cookies.",40,{"path":251,"title":252,"description":253,"order":254,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Freplays","Session replay","Record how people move through the site and watch it back like a video, even next to an error.",41,{"path":256,"title":257,"description":258,"order":259,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Freleases","Releases","The versions running in each environment, bound to GitHub tags, and the errors that come back after a fix.",42,{"path":261,"title":262,"description":263,"order":264,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fvulnerabilities","Vulnerabilities","Known security problems in your projects' libraries, and the languages that no longer get fixes.",43,{"path":266,"title":267,"description":268,"order":269,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fseo","SEO","CloseYourIt visits your sites like a search engine and tells you what keeps your pages from being found.",44,{"path":271,"title":272,"description":273,"order":274,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fknowledge","Knowledge base","Write notes, decisions and guides for your projects, find them by meaning and ask questions with sources.",45,{"path":276,"title":277,"description":278,"order":279,"group":199,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fagents","AI agents","Which tickets agents take, what they hand you, where you decide and how each machine is measured.",46,{"path":281,"title":282,"description":283,"order":284,"group":14,"parent":8,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog","Versions","Every CloseYourIt system with its latest version, and the notes of each release.",50,{"path":286,"title":287,"description":288,"order":289,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-app","App","Every stable version of App, newest first.",51,"changelog",{"path":292,"title":293,"description":294,"order":295,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-cli","Command line (cyi)","Every stable version of Command line (cyi), newest first.",52,{"path":297,"title":140,"description":298,"order":299,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-automator","Every stable version of Automator, newest first.",53,{"path":301,"title":86,"description":302,"order":303,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-agent-server","Every stable version of Server agent, newest first.",54,{"path":305,"title":306,"description":307,"order":308,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-agent-kubernetes","Kubernetes agent","Every stable version of Kubernetes agent, newest first.",55,{"path":310,"title":311,"description":312,"order":313,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-sdk-javascript","JavaScript SDK","Every stable version of JavaScript SDK, newest first.",56,{"path":315,"title":316,"description":317,"order":318,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-sdk-ruby","Ruby SDK","Every stable version of Ruby SDK, newest first.",57,{"path":320,"title":321,"description":322,"order":323,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-sdk-python","Python SDK","Every stable version of Python SDK, newest first.",58,{"path":325,"title":326,"description":327,"order":328,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-sdk-dart","Dart SDK","Every stable version of Dart SDK, newest first.",59,{"path":330,"title":331,"description":332,"order":333,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-skills","Skills for AI assistants","Every stable version of Skills for AI assistants, newest first.",60,{"path":335,"title":336,"description":337,"order":338,"group":8,"parent":290,"package":8,"note":8,"collects":8,"status":8},"\u002Fdocs\u002Fchangelog-site","Website and docs","Every stable version of Website and docs, newest first.",61,{"id":340,"title":176,"body":341,"collects":8,"description":177,"extension":838,"group":8,"meta":839,"navigation":840,"note":8,"order":178,"package":8,"parent":173,"path":175,"seo":841,"status":8,"stem":842,"__hash__":843},"docs_en\u002Fdocs\u002Frecipe-payment-alert.md",{"type":342,"value":343,"toc":827},"minimark",[344,348,353,383,386,390,411,428,432,472,483,497,501,508,542,555,579,583,586,614,663,666,687,691,747,753,757,772,775,779,789,793,823],[345,346,347],"p",{},"You get a Telegram message every time a payment fails in your Rails app, with a link to the details. The app writes the failure as an error-level log, a rule turns it into an alert, and your preferences send that alert to Telegram.",[349,350,352],"h2",{"id":351},"_1-create-the-project-and-the-token","1. Create the project and the token",[354,355,356,365,372],"ol",{},[357,358,359,360,364],"li",{},"In CloseYourIt create a project for the app, for example ",[361,362,363],"code",{},"shop",".",[357,366,367,368,364],{},"In the project's settings create an ",[369,370,371],"strong",{},"ingest token",[357,373,374,375,378,379,382],{},"Copy two values: the secret ",[361,376,377],{},"token",", which starts with ",[361,380,381],{},"cyi_",", and the project id.",[345,384,385],{},"The token is secret: keep it in the server's environment, never in the code.",[349,387,389],{"id":388},"_2-install-the-gem","2. Install the gem",[391,392,397],"pre",{"className":393,"code":394,"language":395,"meta":396,"style":396},"language-ruby shiki shiki-themes github-light github-dark","# Gemfile\ngem \"closeyourit-ruby\"\n","ruby","",[361,398,399,406],{"__ignoreMap":396},[400,401,403],"span",{"class":402,"line":13},"line",[400,404,405],{},"# Gemfile\n",[400,407,408],{"class":402,"line":19},[400,409,410],{},"gem \"closeyourit-ruby\"\n",[391,412,416],{"className":413,"code":414,"language":415,"meta":396,"style":396},"language-bash shiki shiki-themes github-light github-dark","bundle install\n","bash",[361,417,418],{"__ignoreMap":396},[400,419,420,424],{"class":402,"line":13},[400,421,423],{"class":422},"sScJk","bundle",[400,425,427],{"class":426},"sZZnC"," install\n",[349,429,431],{"id":430},"_3-configure-it","3. Configure it",[391,433,435],{"className":393,"code":434,"language":395,"meta":396,"style":396},"# config\u002Finitializers\u002Fcloseyourit.rb\nCloseYourIt.init do |c|\n  c.endpoint_url = \"https:\u002F\u002Fbugs.example.com\"\n  c.token        = ENV[\"CLOSEYOURIT_TOKEN\"]\n  c.project_id   = ENV[\"CLOSEYOURIT_PROJECT_ID\"]\n  c.environment  = Rails.env\nend\n",[361,436,437,442,447,452,457,462,467],{"__ignoreMap":396},[400,438,439],{"class":402,"line":13},[400,440,441],{},"# config\u002Finitializers\u002Fcloseyourit.rb\n",[400,443,444],{"class":402,"line":19},[400,445,446],{},"CloseYourIt.init do |c|\n",[400,448,449],{"class":402,"line":24},[400,450,451],{},"  c.endpoint_url = \"https:\u002F\u002Fbugs.example.com\"\n",[400,453,454],{"class":402,"line":29},[400,455,456],{},"  c.token        = ENV[\"CLOSEYOURIT_TOKEN\"]\n",[400,458,459],{"class":402,"line":34},[400,460,461],{},"  c.project_id   = ENV[\"CLOSEYOURIT_PROJECT_ID\"]\n",[400,463,464],{"class":402,"line":39},[400,465,466],{},"  c.environment  = Rails.env\n",[400,468,469],{"class":402,"line":45},[400,470,471],{},"end\n",[345,473,474,475,478,479,482],{},"Set ",[361,476,477],{},"CLOSEYOURIT_TOKEN"," and ",[361,480,481],{},"CLOSEYOURIT_PROJECT_ID"," in the environment of the deployed app, then deploy.",[345,484,485,486,478,489,492,493,496],{},"The gem sends nothing from the ",[361,487,488],{},"development",[361,490,491],{},"test"," environments. To try the recipe from your computer, add ",[361,494,495],{},"c.disabled_environments = []"," to the block, and remove it when you are done.",[349,498,500],{"id":499},"_4-write-the-failed-payment","4. Write the failed payment",[345,502,503,504,507],{},"Where your code charges the customer, write a log of level ",[361,505,506],{},"error"," when the charge fails:",[391,509,511],{"className":393,"code":510,"language":395,"meta":396,"style":396},"def charge(order)\n  PaymentGateway.charge!(order)\nrescue PaymentGateway::Error => e\n  CloseYourIt.log(:error, \"Payment failed\", order_id: order.id, reason: e.message)\n  raise\nend\n",[361,512,513,518,523,528,533,538],{"__ignoreMap":396},[400,514,515],{"class":402,"line":13},[400,516,517],{},"def charge(order)\n",[400,519,520],{"class":402,"line":19},[400,521,522],{},"  PaymentGateway.charge!(order)\n",[400,524,525],{"class":402,"line":24},[400,526,527],{},"rescue PaymentGateway::Error => e\n",[400,529,530],{"class":402,"line":29},[400,531,532],{},"  CloseYourIt.log(:error, \"Payment failed\", order_id: order.id, reason: e.message)\n",[400,534,535],{"class":402,"line":34},[400,536,537],{},"  raise\n",[400,539,540],{"class":402,"line":39},[400,541,471],{},[345,543,544,547,548,551,552,554],{},[361,545,546],{},"PaymentGateway"," stands for the library you already use. ",[361,549,550],{},"raise"," lets the error go on as before: CloseYourIt also records it in ",[369,553,202],{},", with the lines of code it went through.",[345,556,557,558,478,561,564,565,568,569,568,571,574,575,578],{},"Give attributes plain names, such as ",[361,559,560],{},"order_id",[361,562,563],{},"reason",". Values whose name contains ",[361,566,567],{},"card",", ",[361,570,377],{},[361,572,573],{},"email"," or other sensitive words leave the app as ",[361,576,577],{},"[FILTERED]",", on purpose.",[349,580,582],{"id":581},"_5-connect-telegram","5. Connect Telegram",[345,584,585],{},"The bot is created once for the whole installation, by whoever manages the server:",[354,587,588,591,611],{},[357,589,590],{},"Create a bot with BotFather in Telegram.",[357,592,593,594,597,598,568,601,478,604,607,608,364],{},"In ",[361,595,596],{},"\u002Fopt\u002Fcloseyourit\u002F.env"," set ",[361,599,600],{},"TELEGRAM_BOT_TOKEN",[361,602,603],{},"TELEGRAM_BOT_USERNAME",[361,605,606],{},"TELEGRAM_WEBHOOK_SECRET",", then run ",[361,609,610],{},"closeyourit restart",[357,612,613],{},"Register the bot once:",[391,615,617],{"className":413,"code":616,"language":415,"meta":396,"style":396},"cd \u002Fopt\u002Fcloseyourit\ndocker compose exec app bin\u002Frails telegram:set_webhook\ndocker compose exec app bin\u002Frails telegram:set_commands\n",[361,618,619,628,648],{"__ignoreMap":396},[400,620,621,625],{"class":402,"line":13},[400,622,624],{"class":623},"sj4cs","cd",[400,626,627],{"class":426}," \u002Fopt\u002Fcloseyourit\n",[400,629,630,633,636,639,642,645],{"class":402,"line":19},[400,631,632],{"class":422},"docker",[400,634,635],{"class":426}," compose",[400,637,638],{"class":426}," exec",[400,640,641],{"class":426}," app",[400,643,644],{"class":426}," bin\u002Frails",[400,646,647],{"class":426}," telegram:set_webhook\n",[400,649,650,652,654,656,658,660],{"class":402,"line":24},[400,651,632],{"class":422},[400,653,635],{"class":426},[400,655,638],{"class":426},[400,657,641],{"class":426},[400,659,644],{"class":426},[400,661,662],{"class":426}," telegram:set_commands\n",[345,664,665],{},"Then each person connects their own chat:",[354,667,668,678,684],{},[357,669,593,670,673,674,677],{},[369,671,672],{},"Preferences → Notifications"," turn Telegram on and press ",[369,675,676],{},"Connect Telegram",": the chat with the bot opens.",[357,679,680,681,364],{},"In the chat, press ",[369,682,683],{},"Start",[357,685,686],{},"Back on the page, when you read \"Connected as\", the chat is ready.",[349,688,690],{"id":689},"_6-create-the-alert-rule","6. Create the alert rule",[354,692,693,703,712,721,735,741],{},[357,694,695,696,699,700,364],{},"Open ",[369,697,698],{},"Alerts → Alert rules"," and press ",[369,701,702],{},"New rule",[357,704,705,708,709,364],{},[369,706,707],{},"Name",": ",[361,710,711],{},"Payment failed",[357,713,714,708,717,364],{},[369,715,716],{},"Event",[718,719,720],"em",{},"Error\u002Ffatal log",[357,722,723,708,726,728,729,708,732,364],{},[369,724,725],{},"Project",[361,727,363],{},". ",[369,730,731],{},"Environment",[361,733,734],{},"production",[357,736,737,740],{},[369,738,739],{},"Group repeated alerts",": for example 10 minutes, so a burst of failures becomes one message.",[357,742,743,744,364],{},"Press ",[369,745,746],{},"Save rule",[345,748,749,750,752],{},"The rule fires for every error or fatal log of that project. With this configuration the gem only sends the logs you write yourself, so keep the ",[361,751,506],{}," level for things a person must look at.",[349,754,756],{"id":755},"_7-send-the-alert-to-telegram","7. Send the alert to Telegram",[354,758,759,763,766],{},[357,760,695,761,364],{},[369,762,672],{},[357,764,765],{},"Find the error log alert in the list: the search field finds it by name.",[357,767,768,769,364],{},"In its Telegram column choose ",[369,770,771],{},"Every time",[345,773,774],{},"Quiet hours hold back emails only: Telegram messages are not delayed.",[349,776,778],{"id":777},"_8-try-it","8. Try it",[345,780,781,782,784,785,788],{},"Make a payment fail where the gem sends data, for example with a card your payment provider declines in test mode. Logs leave the app every 5 seconds: within a few seconds the message arrives in Telegram, with the link to the log. The same message is in ",[369,783,212],{},", with the ",[369,786,787],{},"Level"," filter on error.",[349,790,792],{"id":791},"if-nothing-arrives","If nothing arrives",[794,795,796,805,813,820],"ul",{},[357,797,798,799,801,802,804],{},"The app runs in ",[361,800,488],{}," or ",[361,803,491],{},": the gem stays silent there (see step 3).",[357,806,807,808,801,810,812],{},"The rule's ",[369,809,725],{},[369,811,731],{}," does not match the app.",[357,814,593,815,817,818,364],{},[369,816,672],{}," the Telegram column of that alert is not ",[369,819,771],{},[357,821,822],{},"Telegram does not show \"Connected as\": repeat step 5.",[824,825,826],"style",{},"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);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":396,"searchDepth":19,"depth":19,"links":828},[829,830,831,832,833,834,835,836,837],{"id":351,"depth":19,"text":352},{"id":388,"depth":19,"text":389},{"id":430,"depth":19,"text":431},{"id":499,"depth":19,"text":500},{"id":581,"depth":19,"text":582},{"id":689,"depth":19,"text":690},{"id":755,"depth":19,"text":756},{"id":777,"depth":19,"text":778},{"id":791,"depth":19,"text":792},"md",{},true,{"title":176,"description":177},"docs\u002Frecipe-payment-alert","TrIqp7Unf9lLguk6GSiLwkg6LugJRJMGcWENUbO4TMg",1794441702205]