Skip to content

Commit 678512e

Browse files
committed
Fix code blocks contained in markdown code blocks that should be printed as literals
1 parent 000470f commit 678512e

3 files changed

Lines changed: 26 additions & 18 deletions

File tree

  • src/content/articles
    • api-gateway-metrics-traces-logs-debugging
    • argocd-sync-failures-gitops-debugging-troubleshooting
    • demo

‎src/content/articles/api-gateway-metrics-traces-logs-debugging/pdf.mdx‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -816,30 +816,30 @@ With instrumentation and dashboards in place, you're ready to debug real problem
816816

817817
You receive an alert: P99 latency has exceeded 2 seconds. Users are complaining. Here is how to investigate systematically:
818818

819-
```markdown title="latency-debug-runbook.md"
819+
````markdown title="latency-debug-runbook.md"
820820
# Gateway Latency Spike Investigation
821821
# Use this runbook when gateway latency alerts fire
822822

823823
## Step 1: Identify Scope
824824

825825
Query: Is latency high for all routes or specific routes?
826826

827-
\`\`\`promql
827+
```promql
828828
histogram_quantile(0.99,
829829
sum(rate(gateway_request_duration_seconds_bucket[5m])) by (le, route)
830830
)
831-
\`\`\`
831+
```
832832

833833
If one route is slow, focus there. If all routes are slow, the problem is gateway-wide.
834834

835835
## Step 2: Gateway vs. Backend
836836

837837
Query: Is the gateway slow, or is a backend slow?
838838

839-
\`\`\`promql
839+
```promql
840840
# Gateway overhead only
841841
avg(gateway_request_duration_seconds - gateway_upstream_duration_seconds) by (route)
842-
\`\`\`
842+
```
843843

844844
If gateway overhead is high, check gateway resources (CPU, memory, connection pools).
845845
If upstream time is high, the problem is in the backend.
@@ -853,10 +853,10 @@ Look for: long spans, retries, connection waits, DNS resolution.
853853

854854
Query: Are circuit breakers tripping? Connection pools exhausted?
855855

856-
\`\`\`promql
856+
```promql
857857
gateway_circuit_breaker_state{upstream="affected-service"}
858858
gateway_upstream_connections_active / gateway_upstream_connections_max
859-
\`\`\`
859+
```
860860

861861
## Step 5: Correlate with Logs
862862

@@ -865,7 +865,7 @@ Look for: error messages, timeout logs, retry logs, connection errors.
865865

866866
**AWS Alternative**: Use CloudWatch Logs Insights with queries like:
867867
`fields @timestamp, requestId, route, latency | filter latency > 2000 | sort @timestamp desc`
868-
```
868+
````
869869

870870
Code: Latency spike investigation runbook using gateway observability.
871871

‎src/content/articles/argocd-sync-failures-gitops-debugging-troubleshooting/pdf.mdx‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ The root cause is almost always a hook Job that isn't completing. Either it's st
517517

518518
Here's the runbook I use:
519519

520-
```markdown title="runbooks/hook-stuck.md"
520+
````markdown title="runbooks/hook-stuck.md"
521521
# Runbook: Sync Stuck on Hook
522522

523523
## Symptoms
@@ -527,19 +527,22 @@ Here's the runbook I use:
527527
## Diagnosis
528528

529529
1. Identify the stuck hook:
530-
\`\`\`bash
530+
531+
```bash
531532
kubectl get jobs -n myapp -l argocd.argoproj.io/hook
532-
\`\`\`
533+
```
533534

534535
2. Check hook job status:
535-
\`\`\`bash
536+
537+
```bash
536538
kubectl describe job <hook-job-name> -n myapp
537-
\`\`\`
539+
```
538540

539541
3. Check hook pod logs:
540-
\`\`\`bash
542+
543+
```bash
541544
kubectl logs -n myapp -l job-name=<hook-job-name>
542-
\`\`\`
545+
```
543546

544547
## Common Causes
545548

@@ -552,20 +555,23 @@ kubectl logs -n myapp -l job-name=<hook-job-name>
552555
## Resolution
553556

554557
1. If hook can be safely skipped:
555-
\`\`\`bash
558+
559+
```bash
556560
argocd app sync myapp --prune --force
557-
\`\`\`
561+
```
558562

559563
2. If hook needs to complete:
564+
560565
- Fix the underlying issue
561566
- Delete the stuck job
562567
- Trigger new sync
563568

564569
3. To prevent recurrence:
570+
565571
- Add `activeDeadlineSeconds` to job spec
566572
- Add proper health checks to hook
567573
- Consider using `hook-delete-policy: BeforeHookCreation`
568-
```
574+
````
569575
Code: Runbook for debugging sync stuck on hook execution.
570576

571577
The key insight is that ArgoCD can't tell you why the hook is stuck—it only knows the Job hasn't reached a terminal state. You have to dig into Kubernetes to find the actual cause.

‎src/content/articles/demo/index.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@ Showcase related articles using the production carousel component:
541541

542542
The project contains the full bundle of Shiki languages. They are dynamically loaded individually. Some common languages: `asm` for Assembly, `astro`, `awk`, `blade`, `clojure`, `cmake`, `cpp` for C++, `csharp` for C#, `css`, `diff`, `docker` for Dockerfiles, `dotenv`, `erlang`, `go`, `graphql`, `haskell`, `html`, `http`, `ini`, `java`, `javascript` / `js`, `json`, `json5`, `jsx`, `kotlin`, `log`, `lua`, `make`, `markdown`, `mdx`, `php`, `powershell`, `puppet`, `python`, `r`, `regexp`, `ruby`, `rust`, `scala`, `scss`, `sql`, `svelte`, `swift`, `systemd`, `terraform`, `toml`, `tsx`, `typescript` / `ts`, `vue`, `xml`, `yaml`. `promql` is aliased to `go` for now.
543543

544+
Note that code blocks that are not inline must be wrapped with _at least_ three backticks, but can be wrapped with more. So for example to include an example code block inside of a markdown code block, you can use four backticks to wrap the markdown code block - which allows you to use a code block with three backticks as a literal inside the code block.
545+
544546
This `console.log("hello, world!")` statement is inline code.
545547

546548
```typescript

0 commit comments

Comments
 (0)