This document explains the complete journey of a log from your Python application to Grafana through OpenTelemetry and Loki.
l*ink to code: https://github.com/grafana/loki-fundamentals/blob/microservice-otel-collector/greenhouse/loggingfw.py
In your application (e.g., bug_service.py):