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(redisotel): fix buggy append in reportPoolStats #3122

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Sep 15, 2024

  1. fix(redisotel): fix buggy append in reportPoolStats

    The current append twice to `conf.attrs` approach in `reportPoolStats` may result in unexpected idleAttrs,
    due to `append` [can mutate](golang/go#29115 (comment)) the underlying array of the original slice,
    as demonstrated at <https://go.dev/play/p/jwRMofH91eQ?v=goprev>.
    
    Also, I replaced `metric.WithAttributes` in `reportPoolStats` with `metric.WithAttributeSet`,
    since `WithAttributes` is just `WithAttributeSet` with some extra works that are not needed here,
    see <https://pkg.go.dev/go.opentelemetry.io/otel/[email protected]#WithAttributes>.
    wzy9607 committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    fc5be74 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Configuration menu
    Copy the full SHA
    960ff8b View commit details
    Browse the repository at this point in the history