Skip to content
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

fix: remove connection-id from metrics attributes #2384

Merged

Conversation

olavloite
Copy link
Collaborator

The OpenTelemetry Attributes for metrics included a unique identifier for each connection. This can potentially create a very large number of time series, as each connection will be a time serie. Applications that continously create and drop connections will then produce a very large number of time series, which again can result in RESOURCE_EXHAUSTED error being returned from the monitoring backend.

Fixes #2377

The OpenTelemetry Attributes for metrics included a unique identifier
for each connection. This can potentially create a very large number
of time series, as each connection will be a time serie. Applications
that continously create and drop connections will then produce a very
large number of time series, which again can result in RESOURCE_EXHAUSTED
error being returned from the monitoring backend.

Fixes #2377
Copy link
Collaborator

@thiagotnunes thiagotnunes left a comment

Choose a reason for hiding this comment

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

Is this used in the backend metrics in any way?

@olavloite
Copy link
Collaborator Author

Is this used in the backend metrics in any way?

No (unless I misunderstand what you mean). This is for metrics that are collected using OpenTelemetry in PGAdapter and that users can choose to export to any metrics collector that has an OpenTelemetry integration (e.g. Google Cloud Monitoring, but also many other monitoring systems).

@thiagotnunes
Copy link
Collaborator

Do we need to update any documentation as well?

@olavloite
Copy link
Collaborator Author

Do we need to update any documentation as well?

Not specifically for this change. Our OpenTelemetry documentation does not include any specifics on these metrics. But we should add a section on metrics to that documentation page. I've added #2392 for that.

@olavloite olavloite merged commit 23cdc52 into postgresql-dialect Sep 30, 2024
41 checks passed
@olavloite olavloite deleted the remove-connection-id-from-metrics-attributes branch September 30, 2024 08:29
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.

OpenTelemetry Cardinality Errors and ResourceExhaustedException
2 participants