Content Deep Dive

Database Monitoring with OpenTelemetry: Postgres Case Study

Blog post from OpenObserve

Post Details
Company
Date Published
Author
Ashish Kolhe
Word Count
3,697
Company Posts That Month
18
Language
English
Hacker News Points
-
Post removed?
No
Summary

OpenObserve’s OpenTelemetry-based database monitoring was used to investigate PostgreSQL activity in its own metadata store, revealing three costly query patterns: a frequently executed UPDATE that rewrote unchanged JSON fields and accounted for 85% of database time, a cache-reload query that fetched about 40,700 rows per call, and a DELETE that scanned partitions because it omitted the partition key. The team reduced unnecessary writes by updating only changed fields, limited cache invalidations to meaningful data changes, and included the date partition key in deletes; the latter change cut sampled p95 latency from 4.3 seconds to 5.1 milliseconds. The monitoring combines application database spans with PostgreSQL statistics and activity data collected by the OpenTelemetry Collector Contrib, enabling queries to be ranked by total database time and linked to plans, wait events, and traced callers. Setup requires PostgreSQL monitoring permissions and a Collector configuration with query events enabled, while table permissions affect whether plans are available; the article also notes security, sampling, and connection considerations. In a PostgreSQL 16 test, monitoring used about 0.060% of database execution time and 13 connections per instance, with configurable collection settings to manage data volume.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
OpenTelemetry 27 822 142 56 -4%
Observability 6 2,390 523 156 -23%
Kubernetes 4 4,377 419 114 -15%
Real-time 2 3,194 698 199 -24%
LLM 1 3,674 823 199 -44%
MCP 1 9,757 959 203 -18%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.