Skip to content

Commit f11896b

Browse files
committed
fixup: improving attribute
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
1 parent 3848172 commit f11896b

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

flagd/pkg/runtime/runtime.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ func (r *Runtime) updateAndEmit(payload sync.DataSync) bool {
149149
tracer := tp.Tracer("flagd-sync")
150150
ctx, span := tracer.Start(context.Background(), "flagd flagset update",
151151
trace.WithSpanKind(trace.SpanKindProducer),
152-
trace.WithAttributes(attribute.String("feature_flag.source", payload.Source)),
153-
trace.WithAttributes(attribute.String("feature_flag.selector", payload.Selector)),
154-
trace.WithAttributes(attribute.String("feature_flag.sync_type", payload.Type.String())),
152+
trace.WithAttributes(attribute.String("feature_flag.set.source", payload.Source)),
153+
trace.WithAttributes(attribute.String("feature_flag.set.id", payload.Selector)),
154+
trace.WithAttributes(attribute.String("feature_flag.flagd.sync_type", payload.Type.String())),
155155
)
156156
defer span.End()
157157
notifications, resyncRequired, err := r.Evaluator.SetState(payload)
@@ -163,7 +163,7 @@ func (r *Runtime) updateAndEmit(payload sync.DataSync) bool {
163163
}
164164

165165
// Number of notifications correlates to the number of flags changed through this sync, record it
166-
span.SetAttributes(attribute.Int("feature_flag.change_count", len(notifications)))
166+
span.SetAttributes(attribute.Int("feature_flag.set.flag_count", len(notifications)))
167167

168168
r.Service.Notify(service.Notification{
169169
Type: service.ConfigurationChange,

flagd/pkg/service/flag-sync/sync-multiplexer.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,6 @@ func (r *Multiplexer) SourcesAsMetadata() string {
164164
return strings.Join(r.sources, ",")
165165
}
166166

167-
type flagConfig struct {
168-
flags map[string]model.Flag
169-
metadata map[string]string
170-
}
171-
172167
// reFill local configuration values
173168
func (r *Multiplexer) reFill(ctx context.Context) error {
174169
clear(r.selectorFlags)

0 commit comments

Comments
 (0)