Skip to content

Instantly share code, notes, and snippets.

@jlisee
Created August 30, 2026 21:29
Show Gist options
  • Select an option

  • Save jlisee/ede2c5d05cd00d8e7af8b17ad6fd0bb2 to your computer and use it in GitHub Desktop.

Select an option

Save jlisee/ede2c5d05cd00d8e7af8b17ad6fd0bb2 to your computer and use it in GitHub Desktop.
OTEL telemetry dumping local proxy
from http.server import BaseHTTPRequestHandler, HTTPServer
class H(BaseHTTPRequestHandler):
def do_POST(self):
print(f"\nPOST {self.path}")
print(self.headers)
n = int(self.headers.get("content-length", 0))
body = self.rfile.read(n)
print(body[:1000])
self.send_response(200)
self.end_headers()
HTTPServer(("127.0.0.1", 4318), H).serve_forever()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment