Skip to content

Instantly share code, notes, and snippets.

@nutshellfool
nutshellfool / metric_collector_middleware.py
Last active Jun 8, 2020
Django middleware metric collector pattern example
View metric_collector_middleware.py
import datetime
import logging
from django.conf import settings
from kafka import KafkaProducer
# from pykafka import KafkaClient