You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf: cache the key used for OTEL traces and metrics (#3814)
* perf: cache the key used for OTEL traces and metrics
The HeaderInterceptor creates a key consisting of the database name and method name
that is used for OpenTelemetry attributes and metrics. The number of unique keys is
low. However, the key is constructed from the DatabaseName and method name every time,
which leads to a lot of string creation:
1. The DatabaseName.toString() method is called every time. This constructs a new string.
2. The result of DatabaseName.toString() is concatenated with the methodName to create yet
another string.
Instead of creating the key every time, we can cache the key values without doing the string
creation and concatenation every time.
* chore: generate libraries at Thu Apr 10 11:15:55 UTC 2025
---------
Co-authored-by: cloud-java-bot <[email protected]>
0 commit comments