Skip to content

Add ccp_replication_slots to OTel metrics. #4167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

dsessler7
Copy link
Contributor

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)?

The ccp_replication_slots metrics are not present when using OTel.

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

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

The ccp_replication_slots metrics are added to the OTel metrics collection.

Other Information:

Copy link
Contributor

@benjaminjb benjaminjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth it to demo this to show how/what things are working

fiveSecondMetricsClone, err = appendToJSONArray(fiveSecondMetricsClone, eqPG16)
}
if err != nil {
log.Error(err, "error compiling postgres metrics")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I look at this again, I wish the errors had some differentiation so that we could pinpoint which appendToJSONArray actually errored. (This may be scope creep as it doesn't entirely fall within this ticket.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to get this merged sooner than later so I can move on to fixing the intervals for certain queries; however, I'm going to be touching this code again when working on that, so I could improve the error messages then

Use COALESCE to change NULLs to zero-values.
@dsessler7 dsessler7 force-pushed the otel-add-ccp-replication-slots branch from 069703e to 474c06d Compare May 6, 2025 19:23
@dsessler7 dsessler7 enabled auto-merge (rebase) May 6, 2025 19:25
@dsessler7 dsessler7 merged commit e55ae53 into CrunchyData:main May 6, 2025
18 checks passed
@dsessler7 dsessler7 deleted the otel-add-ccp-replication-slots branch May 6, 2025 19:38
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.

3 participants