Guance Learn

Observability questions

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

Metrics monitoring and troubleshooting
Explainer

Count distinct label values with PromQL

Use nested count aggregations to count unique label values, group results by job, and distinguish healthy targets from all known instances.

Illustration of Git branches and version history
Technical guide

Update all Git submodules to upstream revisions

Distinguish recorded gitlink updates from tracking newer remote commits, and commit nested submodule changes in the correct order.

Illustration of Git branches and version history
Technical guide

Choose how git pull handles divergent branches

Set a deliberate merge, rebase, or fast-forward-only policy and inspect configuration precedence instead of merely hiding the warning.

Illustration of collecting, processing, and monitoring logs
Explainer

What Time_Key does in a Fluent Bit parser

Use Time_Key, Time_Format, and Time_Keep to distinguish event time from collection time and preserve the original timestamp for troubleshooting.

Python programming and application logging
Explainer

Read a file line by line in Python

Iterate over a text file with a context manager, preserve meaningful whitespace, and handle encoding and long-line memory limits.

Python programming and application logging
Explainer

Read standard input in Python

Use input for prompts, stream lines from sys.stdin, or accept files and pipes with fileinput without accidentally consuming input twice.

Illustration of server operations and log analysis
Explainer

Write Docker container logs to a chosen file

Choose a temporary export, a system logging destination, or an application file mount, and understand how rotation and docker logs availability differ.

Python programming and application logging
Explainer

Remove trailing newlines from a Python string

Choose rstrip or removesuffix based on whether you want to remove all trailing newline characters, one line ending, or every kind of whitespace.

Python programming and application logging
Explainer

Reverse a string in Python

Reverse a string with slicing or reversed, and understand why Unicode code-point reversal may split combining marks or emoji sequences.

Python programming and application logging
Explainer

Schedule a Python script with cron

Run a Python script from cron with explicit paths, a predictable environment, writable logs, and checks for failed or missing executions.

Illustration of software components, data, and application workflows
Explainer

Run pytest tests in parallel with pytest-xdist

Choose a worker count and scheduling policy, isolate shared resources, and measure whether parallel execution improves your actual test suite.

Log monitoring dashboard illustration
Explainer

Stop Logstash safely

Use the service manager or a shutdown signal, inspect stalled outputs, and understand what persistent queues do during Logstash shutdown.