Created
August 30, 2026 21:29
-
-
Save jlisee/ede2c5d05cd00d8e7af8b17ad6fd0bb2 to your computer and use it in GitHub Desktop.
OTEL telemetry dumping local proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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