Guance Learn

Observability questions

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

Illustration of server operations and request logs
Explainer

Can you recover a private key from an Nginx certificate?

A certificate cannot reveal its matching private key. Locate a saved key, verify the public-key match, or generate a new key and reissue.

Secure network connections and certificate management
Technical guide

Generate a self-signed TLS certificate with OpenSSL

Create a SAN-bearing test certificate with OpenSSL 3.x, protect the private key, and understand the separate requirement for client trust.

Python programming and application logging
Explainer

Get the class name of a Python instance

Use type(obj).__name__ for an instance’s class name, and add the module and qualified name when a short name is ambiguous.

Illustration of scheduled jobs, logs and Linux operations
Explainer

Email cron job errors with MAILTO

Configure cron mail delivery and use an exit-status wrapper when you need messages only for failed runs.

Python programming and application logging
Explainer

Get the current date and time in Python

Read local or UTC time with datetime, obtain Unix timestamps, and use an elapsed-time clock when measuring how long code runs.

Log monitoring illustration
Explainer

Exclude selected container logs from Filebeat

Filter container logs by file path, enriched metadata, or Kubernetes autodiscover rules using filestream inputs.

Python programming and application logging
Explainer

Get the last element of a Python list

Read a list’s final item with negative indexing, handle empty lists deliberately, and distinguish reading an item from removing it.

Python programming and application logging
Explainer

Get the length of a Python list

Use len() to count list elements, understand what nested lists count, and handle iterators that do not provide a length.

Illustration of files, modules, and dependencies
Technical guide

List files in a directory with Node.js

Read entry names with readdir, filter Dirent objects by type, or walk incrementally when directory size and symlink behavior matter.

Illustration of files, modules, and dependencies
Technical guide

Get the current module’s path in Node.js

Use CommonJS filename variables or ES module metadata, and distinguish a module’s location from the process working directory.

Application modules and development workflows
Technical guide

Combine a certificate and private key into a PEM file

Combine PEM-encoded certificate and key files safely, preserve certificate-chain order, and validate the resulting bundle for its target service.

Python programming and application logging
Explainer

Extract a substring in Python

Use string slices for index ranges, handle delimiters safely, and account for negative indexes, zero-length requests, and Unicode boundaries.