Compare commits

...

2 Commits

Author SHA1 Message Date
Nikhil Soni
acb25cebf6 revert: drop frontend wiring, keep backend preference only
Scope this PR to the backend preference registration; frontend
consumption of log_details_pinned_attributes will follow separately.
2026-08-26 16:35:24 +05:30
Nikhil Soni
e6c7c09d11 feat: add pinned attributes preference support for log details
Mirrors the trace-details pin feature (#11092): pinned fields persist
as the per-user preference log_details_pinned_attributes and sync
across devices via the existing PrettyView/usePinnedFields machinery.

Assisted-by: Claude Opus 4.8
2026-08-25 15:57:15 +05:30
2 changed files with 11 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ var (
NameSpanDetailsPreviewAttributes = Name{valuer.NewString("span_details_preview_attributes")}
NameSpanDetailsColorByAttribute = Name{valuer.NewString("span_details_color_by_attribute")}
NameSpanPercentileResourceAttributes = Name{valuer.NewString("span_percentile_resource_attributes")}
NameLogDetailsPinnedAttributes = Name{valuer.NewString("log_details_pinned_attributes")}
)
type Name struct{ valuer.String }
@@ -45,6 +46,7 @@ func NewName(name string) (Name, error) {
NameSpanDetailsPreviewAttributes.StringValue(),
NameSpanDetailsColorByAttribute.StringValue(),
NameSpanPercentileResourceAttributes.StringValue(),
NameLogDetailsPinnedAttributes.StringValue(),
},
name,
)

View File

@@ -190,6 +190,15 @@ func NewAvailablePreference() map[Name]Preference {
AllowedValues: []string{},
Value: MustNewValue([]any{}, ValueTypeArray),
},
NameLogDetailsPinnedAttributes: {
Name: NameLogDetailsPinnedAttributes,
Description: "List of pinned attributes in log details drawer.",
ValueType: ValueTypeArray,
DefaultValue: MustNewValue([]any{}, ValueTypeArray),
AllowedScopes: []Scope{ScopeUser},
AllowedValues: []string{},
Value: MustNewValue([]any{}, ValueTypeArray),
},
}
}