Guance Learn

Observability questions

Focused answers for definitions, architecture choices, troubleshooting, pricing, and evaluation.

Python programming and application logging
Explainer

Measure elapsed time in Python

Compare Python timing functions, measure elapsed work with perf_counter, and avoid confusing nanosecond units with clock resolution.

Illustration of Git branches and version history
Technical guide

Merge a Git feature as one squashed commit

Combine a feature branch’s changes in one target-branch commit, review the staged result, and preserve original history when it still matters.

Illustration of Git branches and version history
Technical guide

Apply one specific commit to another Git branch

Use cherry-pick to apply a selected change, inspect its dependencies, and handle conflicts or merge commits explicitly.

Illustration of software components, data, and application workflows
Technical guide

Merge two Python dictionaries in one expression

Use dictionary union or unpacking for a new mapping, understand right-hand precedence, and choose explicitly when values should be combined instead of replaced.

Illustration of Git branches and version history
Technical guide

Edit an earlier Git commit

Pause an interactive rebase at a selected commit, amend its content or message, and understand how rewriting affects descendants and collaborators.

Illustration of metrics, monitoring, and technical investigation
Explainer

Monitor REST APIs with Prometheus

Combine application request, error, and latency metrics with external HTTP probes, keeping route labels bounded.

Illustration of Git branches and version history
Technical guide

Move recent Git commits to a new branch

Keep recent commits reachable on a feature branch, move an unpublished branch back, and choose a history-preserving approach for shared commits.

Illustration of server operations and request logs
Explainer

Keep Nginx startup independent of upstream DNS availability

Avoid configuration-time hostname failures with runtime resolution, understand backup limits, and return a controlled maintenance response.

Python programming and application logging
Explainer

Pad strings and numbers with zeros in Python

Use zfill for signed strings, numeric format specifications for integers, and rjust or ljust when you need literal character padding.

Parse Apache access logs for analysis
Explainer

Parse Apache access logs for analysis

Extract request fields with awk or Python, handle missing response sizes, and match the parser to the configured Apache LogFormat.

Illustration of server operations and request logs
Explainer

Parse Nginx access logs for request analysis

Extract fields from combined access logs, count requests by status and second, and avoid misleading timing or time-window analysis.

Illustration of an event loop and asynchronous tasks
Technical guide

Read command-line arguments in Node.js

Read positional arguments with process.argv, parse named options with util.parseArgs, and pass arguments through npm scripts correctly.