Skip to content

Conversation

@tie
Copy link

@tie tie commented Sep 5, 2025

First, this change updates database stats recording to return early if there is an error when creating instruments. Before, the resulting instrument was nil and RegisterCallback returned an error instead.

Second, it adds oteltest.NewMetricProviderWithError to help with testing this behavior.

It also documents panic behavior for Wrap function and removes non-idiomatic handleErr functions.

First, this change updates database stats recording to return early if
there is an error when creating instruments. Before, the resulting
instrument was nil and RegisterCallback returned an error instead.

Second, it adds oteltest.NewMetricProviderWithError to help with testing
this behavior.

It also documents panic behavior for Wrap function and removes
non-idiomatic handleErr functions.
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.

1 participant