Skip to content

Throttle pgbackrest metrics collection frequency - #4536

Open
bendilley wants to merge 2 commits into
CrunchyData:mainfrom
skillstream:otel-throttle-pgbackrest-info
Open

Throttle pgbackrest metrics collection frequency#4536
bendilley wants to merge 2 commits into
CrunchyData:mainfrom
skillstream:otel-throttle-pgbackrest-info

Conversation

@bendilley

Copy link
Copy Markdown

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • New feature
  • Bug fix
  • Documentation
  • Testing enhancement
  • Other

What is the current behavior (link to any open issues here)?
As documented in #4532, Open Telemetry monitoring of a pgbackrest S3 store generates steep egress fees. I think the default should have a low impact on egress, and it seems the legacy exporter did implement a throttle for this reason.

What is the new behavior (if this is a feature change)?

  • Breaking change (fix or feature that would cause existing functionality to change)

For Open Telemetry, implement a similar throttling technique to the legacy exporter, with the same default (10 minutes). The 2nd commit includes a configuration option.

Fixes #4532

Other Information:
I'm not a Go/PGSQL developer so I've used github copilot to vibe-code this change. I hope it helps. Please let me know if there are further changes I can make.

For Open Telemetry, implement a similar throttling technique to the
legacy exporter.

Fixes CrunchyData#4532
How to set it in a cluster spec:
```yaml
spec:
  instrumentation:
    metrics:
      pgBackRestInfoThrottleMinutes: 30
```

If omitted, behavior remains equivalent to legacy default throttle
(10 minutes).
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.

Sharp increase in S3 egress fees with OpenTelemetry metrics enabled

1 participant