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

feat: ingest metrics #25692

Merged
merged 1 commit into from
Dec 20, 2024
Merged

feat: ingest metrics #25692

merged 1 commit into from
Dec 20, 2024

Conversation

hiltontj
Copy link
Contributor

Closes #25689

Added prometheus metrics to track lines written and bytes written per database. The write buffer does the tracking after validation of incoming line protocol.

Added a test to check that this works via writes made through the write_lp method on the write buffer.

Note: I did not track writes on a per-table basis, only per-database. Doing it per-table, as per #25689, would be possible but will require a bit of overhead tracking the table name for each line all the way through the validation process. Currently, validation converts the table name to a table ID, and carries that through to the point that the line is deemed valid, since the WAL does not need the table name for write batches.

Added prometheus metrics to track lines written and bytes written per
database. The write buffer does the tracking after validation of incoming
line protocol.

Tests added to verify.
Copy link
Member

@pauldix pauldix left a comment

Choose a reason for hiding this comment

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

Great stuff. I don't think we want to track these metrics per table because of cardinality concerns in Prometheus metrics.

// now do a write that will only be partially accepted to ensure that
// the metrics are only calculated for writes that get accepted:

// the legume will not be accepted, because it contains a new tag,
Copy link
Member

Choose a reason for hiding this comment

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

As a follow up it would be great to add a influxdb_write_lines_rejected_total counter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Opened #25696

@pauldix
Copy link
Member

pauldix commented Dec 20, 2024

@MaduMitha-Ravi once this gets in it would be great to update the perf dashboards and reports to include these figures. That way I can stop asking "what write load was this with?" 😁

@MaduMitha-Ravi
Copy link

Sure Paul 👍

@hiltontj hiltontj merged commit d10ad87 into main Dec 20, 2024
13 checks passed
@hiltontj hiltontj deleted the hiltontj/ingest-metrics branch December 20, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add metrics to track ingest
3 participants