Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

feat(logs): add pinned attributes preference support (#12687)

Nikhil Soni764fe8ec695b
diff --git a/pkg/types/preferencetypes/name.go b/pkg/types/preferencetypes/name.go
index 5b0643ae25..d256e85561 100644
--- a/pkg/types/preferencetypes/name.go
+++ b/pkg/types/preferencetypes/name.go
@@ -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,
)
diff --git a/pkg/types/preferencetypes/preference.go b/pkg/types/preferencetypes/preference.go
index df91acb777..e65d31010a 100644
--- a/pkg/types/preferencetypes/preference.go
+++ b/pkg/types/preferencetypes/preference.go
@@ -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),
+ },
}
}