Skip to content

Remove the thread metric tag - #148

Merged
vahidhashemian merged 1 commit into
pinterest:mainfrom
vahidhashemian:remove_thread_metric_tag
Sep 17, 2026
Merged

vahidhashemian merged 1 commit into
pinterest:mainfrom
vahidhashemian:remove_thread_metric_tag

Conversation

@vahidhashemian

@vahidhashemian vahidhashemian commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The thread tag on PSC OpenTSDB metrics did not provide a useful aggregation or debugging dimension, and it multiplied time series by JVM thread, putting unnecessary load on the metrics backend. OpenTSDBReporter no longer attaches thread to published points.

Counters, meters, gauges, histograms, and timers are written with the remaining tags only: URI, hostname, IP, locality, instance type, process, project, version, and any additional client tags.

PSC still records thread id on PscMetricTag and still uses it when creating metric tag keys and registries. Client APIs, registry identity, reporter scheduling, and non-OpenTSDB reporters are unchanged.

Scope of impact

  • Emitted OpenTSDB series: dashboards, alerts, and queries that grouped or filtered on thread will no longer see that tag. Series that previously differed only by thread now share one tag set, which is the intended cardinality reduction.
  • Write collision: because internal registries remain per-thread while the published tag set no longer includes thread, concurrent reporters for the same metric name and remaining tags can write to the same OpenTSDB series at the same timestamp. Per-thread counter values overwrite each other instead of appearing as separate series.
  • Compatibility: this is a breaking change only for OpenTSDB consumers that depend on thread. PscMetricTag.getThreadId() remains available.

@vahidhashemian
vahidhashemian requested a review from a team as a code owner September 17, 2026 18:30
@vahidhashemian
vahidhashemian merged commit f411a6b into pinterest:main Sep 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants