Guance Learn

Observability questions

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

Get a filename without its extension in Python illustration
Explainer

Get a filename without its extension in Python

Use Path.stem or splitext to remove the final suffix, and handle compound extensions without damaging hidden filenames.

Illustration of Git branches and version history
Technical guide

Get the current Git branch name

Read the current branch with git branch --show-current or symbolic-ref, and handle detached HEAD correctly in scripts and CI.

Illustration of server operations and request logs
Explainer

Troubleshoot Nginx FastCGI 504 timeouts with PHP-FPM

Identify the timeout that fired, inspect PHP-FPM slow requests, and align application deadlines without hiding pool exhaustion.

Illustration of application infrastructure and operations
Technical guide

Route subdomains to different ports on one server

Configure Apache or Nginx to proxy each hostname to a different backend port, including forwarding headers, WebSockets, DNS, and TLS.

Illustration of a Linux server and log data
Explainer

Choose an Apache MPM: event, worker, or prefork

Choose event for a compatible threaded Apache deployment, retain prefork for modules that require it, and size concurrency against measured resource use.

Illustration of metrics, monitoring, and technical investigation
Explainer

Write OR conditions in PromQL

Use regex alternatives for label values and vector set operators for query results, with explicit matching when needed.

Illustration of metrics, monitoring, and technical investigation
Explainer

Get label values from Prometheus

List labels with Grafana or the HTTP API, expose them in query results, and attach metadata with correctly directed vector matching.

Illustration of a secure network bridge
Technical guide

How Apache ServerName and ServerAlias select a virtual host

Understand Apache virtual-host matching, default-host order, wildcard aliases, and the separate roles of TLS SNI and HTTP Host.

Pass parameters to pytest fixtures illustration
Explainer

Pass parameters to pytest fixtures

Parameterize fixtures directly, pass values indirectly from tests, and register command-line options for configurable test setup.

Illustration of an event loop and asynchronous tasks
Technical guide

Send an HTTP POST request from Node.js

Send JSON with fetch, the built-in HTTP modules, or Axios, while handling status codes, response bodies, and timeouts explicitly.

Log an exception with its traceback in Python illustration
Explainer

Log an exception with its traceback in Python

Use logger.exception or exc_info to preserve exception tracebacks, and configure a hook for uncaught main-thread exceptions.

Illustration of log collection and monitoring
Explainer

Parse nested JSON fields in Fluentd

Distinguish JSON objects from JSON-encoded strings, parse an inner field, preserve context, and handle invalid records explicitly.