Skip to content

Conversation

@joshua-spacetime
Copy link
Collaborator

Closes #748.

This patch adds a temporary feature flag for enabling table metrics.

Table metrics are potentially recorded many times within a transaction. This recording is synchronous and therefore can have a noticable impact on latency.

This new flag will be enabled by default.
With it, table metrics will be recorded; without it, they won't.

Note this flag is temporary.
It will be removed once metrics are recorded async.

Description of Changes

Please describe your change, mention any related tickets, and so on here.

API and ABI breaking changes

If this is an API or ABI breaking change, please apply the
corresponding GitHub label.

Expected complexity level and risk

How complicated do you think these changes are? Grade on a scale from 1 to 5,
where 1 is a trivial change, and 5 is a deep-reaching and complex change.

This complexity rating applies not only to the complexity apparent in the diff,
but also to its interactions with existing and future code.

If you answered more than a 2, explain what is complex about the PR,
and what other components it interacts with in potentially concerning ways.

Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

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

I saw more with_label_values in:

  • database_intance_context_control
  • commit_log
  • relational_db
  • locking_tx_datastore/mod.rs
  • wasm_intance_env
  • query
  • subscription

@joshua-spacetime
Copy link
Collaborator Author

@Centril these were the only ones I saw in the profile, apart from query duration metrics. I didn't want to remove all of them, since @jdetter probably still wants at least some observability when perf testing. These ones will remove the added latency to reducer calls.

I can also put the query duration metrics behind the flag, but perhaps @jdetter should weigh in if he thinks they're still important for perf testing.

@Centril
Copy link
Contributor

Centril commented Jan 24, 2024

I can also put the query duration metrics behind the flag

I'd suggest two gates in that case, one with the ones in this PR and one with the rest.

@jdetter
Copy link
Collaborator

jdetter commented Jan 25, 2024

I'm watching this one closely, if we can cover as many metrics as possible with the temporary metrics flag that would be awesome. Let me know when this is ready for testing again 👍

Closes #748.

This patch adds a temporary feature flag for enabling db metrics.

Metrics are recorded synchronously at the moment.
This can have a noticable impact on latency.

Compiling with this flag will enable metrics collection.
This new flag will be turned on by default.
Hence metrics will be collected by default.

Note this flag is temporary.
It will be removed once metrics are recorded async.
Copy link
Collaborator

@jdetter jdetter left a comment

Choose a reason for hiding this comment

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

Excellent, this looks great Josh. I'll include this in the benchmark this weekend 👍

@joshua-spacetime joshua-spacetime dismissed Centril’s stale review January 27, 2024 01:33

Incorporated Centril's suggestions

@joshua-spacetime joshua-spacetime added this pull request to the merge queue Jan 27, 2024
Merged via the queue into master with commit 5df73e8 Jan 27, 2024
@joshua-spacetime joshua-spacetime deleted the joshua/feat/metrics-cfg branch January 27, 2024 01:58
joshua-spacetime added a commit that referenced this pull request Feb 1, 2024
A call site for record_query_duration_metrics was missed in #749.
github-merge-queue bot pushed a commit that referenced this pull request Feb 2, 2024
A call site for record_query_duration_metrics was missed in #749.
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.

Add feature flag for metrics collection

4 participants