Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: redis/rueidis
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.29
Choose a base ref
...
head repository: redis/rueidis
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.30
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Feb 24, 2024

  1. fix: panic rueidisotel without MetricAttrs and TraceAttrs

    rueian committed Feb 24, 2024
    Copy the full SHA
    d9c9b99 View commit details
  2. Merge pull request #479 from redis/fix-otel-missing-attrs

    fix: panic rueidisotel without MetricAttrs and TraceAttrs
    rueian authored Feb 24, 2024
    Copy the full SHA
    152800b View commit details
Showing with 5 additions and 1 deletion.
  1. +5 −1 rueidisotel/metrics.go
6 changes: 5 additions & 1 deletion rueidisotel/metrics.go
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/trace"
)

var (
@@ -106,7 +107,10 @@ func NewClient(clientOption rueidis.ClientOption, opts ...Option) (rueidis.Clien
}

func newClient(opts ...Option) (*otelclient, error) {
cli := &otelclient{}
cli := &otelclient{
mAttrs: metric.WithAttributes(),
tAttrs: trace.WithAttributes(),
}
for _, opt := range opts {
opt(cli)
}