Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
/server/channels/db/migrations @mattermost/server-platform
/server/boards/services/store/sqlstore/migrations @mattermost/server-platform
/server/playbooks/server/sqlstore/migrations @mattermost/server-platform
/server/channels/app/authentication.go @mattermost/product-security
/server/channels/app/authorization.go @mattermost/product-security
14 changes: 0 additions & 14 deletions api/v4/source/custom_profile_attributes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
description: |
List all the Custom Profile Attributes fields.

_This endpoint is experimental._

__Minimum server version__: 10.5

##### Permissions
Expand All @@ -32,8 +30,6 @@
description: |
Create a new Custom Profile Attribute field on the system.

_This endpoint is experimental._

__Minimum server version__: 10.5

##### Permissions
Expand Down Expand Up @@ -122,8 +118,6 @@
**Note:** Fields with `attrs.protected = true` cannot be
modified and will return an error.

_This endpoint is experimental._

__Minimum server version__: 10.5

##### Permissions
Expand Down Expand Up @@ -214,8 +208,6 @@
Marks a Custom Profile Attribute field and all its values as
deleted.

_This endpoint is experimental._

__Minimum server version__: 10.5

##### Permissions
Expand Down Expand Up @@ -257,8 +249,6 @@
**Note:** Values for fields with `attrs.protected = true` cannot be
updated and will return an error.

_This endpoint is experimental._

__Minimum server version__: 10.5

##### Permissions
Expand Down Expand Up @@ -343,8 +333,6 @@
description: |
List all the Custom Profile Attributes values for specified user.

_This endpoint is experimental._

__Minimum server version__: 10.5

##### Permissions
Expand Down Expand Up @@ -387,8 +375,6 @@
**Note:** Values for fields with `attrs.protected = true` cannot be
updated and will return an error.

_This endpoint is experimental._

__Minimum server version__: 11

##### Permissions
Expand Down
2 changes: 2 additions & 0 deletions server/channels/app/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ func (a *App) RegisterPerformanceReport(rctx request.CTX, report *model.Performa
a.Metrics().ObserveDesktopCpuUsage(commonLabels["platform"], commonLabels["desktop_app_version"], h.Labels["process"], h.Value)
case model.DesktopClientMemoryUsage:
a.Metrics().ObserveDesktopMemoryUsage(commonLabels["platform"], commonLabels["desktop_app_version"], h.Labels["process"], h.Value/1000)
case model.PluginWebappPerf:
a.Metrics().ObservePluginWebappPerf(commonLabels["platform"], commonLabels["agent"], h.Labels["plugin_id"], h.Labels["plugin_metric_label"], h.Value)
default:
// we intentionally skip unknown metrics
}
Expand Down
1 change: 1 addition & 0 deletions server/einterfaces/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ type MetricsInterface interface {
ObserveMobileClientSessionMetadata(version string, platform string, value float64, notificationDisabled string)
ObserveDesktopCpuUsage(platform, version, process string, usage float64)
ObserveDesktopMemoryUsage(platform, version, process string, usage float64)
ObservePluginWebappPerf(platform, agent, pluginID, pluginMetricLabel string, elapsed float64)

ObserveAccessControlSearchQueryDuration(value float64)
ObserveAccessControlExpressionCompileDuration(value float64)
Expand Down
5 changes: 5 additions & 0 deletions server/einterfaces/mocks/MetricsInterface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions server/enterprise/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ type MetricsInterfaceImpl struct {
DesktopClientCPUUsage *prometheus.HistogramVec
DesktopClientMemoryUsage *prometheus.HistogramVec

PluginWebappPerf *prometheus.HistogramVec

AccessControlExpressionCompileDuration prometheus.Histogram
AccessControlEvaluateDuration prometheus.Histogram
AccessControlSearchQueryDuration prometheus.Histogram
Expand Down Expand Up @@ -1369,6 +1371,18 @@ func New(ps *platform.PlatformService, driver, dataSource string) *MetricsInterf
)
m.Registry.MustRegister(m.ClientGlobalThreadsLoadDuration)

// Plugin webapp performance metrics
m.PluginWebappPerf = prometheus.NewHistogramVec(
withLabels(prometheus.HistogramOpts{
Namespace: MetricsNamespace,
Subsystem: MetricsSubsystemPlugin,
Name: "webapp_perf",
Help: "Plugin webapp performance measurements",
}),
[]string{"platform", "agent", "plugin_id", "plugin_metric_label"},
)
m.Registry.MustRegister(m.PluginWebappPerf)

m.MobileClientLoadDuration = prometheus.NewHistogramVec(
withLabels(prometheus.HistogramOpts{
Namespace: MetricsNamespace,
Expand Down Expand Up @@ -2202,6 +2216,15 @@ func (mi *MetricsInterfaceImpl) ObserveGlobalThreadsLoadDuration(platform, agent
mi.ClientGlobalThreadsLoadDuration.With(prometheus.Labels{"platform": platform, "agent": agent, "user_id": effectiveUserID}).Observe(elapsed)
}

func (mi *MetricsInterfaceImpl) ObservePluginWebappPerf(platform, agent, pluginID, pluginMetricLabel string, elapsed float64) {
mi.PluginWebappPerf.With(prometheus.Labels{
"platform": platform,
"agent": agent,
"plugin_id": pluginID,
"plugin_metric_label": pluginMetricLabel,
}).Observe(elapsed)
}

func (mi *MetricsInterfaceImpl) ObserveDesktopCpuUsage(platform, version, process string, usage float64) {
mi.DesktopClientCPUUsage.With(prometheus.Labels{"platform": platform, "version": version, "processName": process}).Observe(usage)
}
Expand Down
4 changes: 2 additions & 2 deletions server/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -11782,11 +11782,11 @@
},
{
"id": "web.error.unsupported_browser.min_browser_version.safari",
"translation": "Version 17.4+"
"translation": "Version 26.2+"
},
{
"id": "web.error.unsupported_browser.min_os_version.mac",
"translation": "macOS 12+"
"translation": "macOS 14+"
},
{
"id": "web.error.unsupported_browser.min_os_version.windows",
Expand Down
3 changes: 3 additions & 0 deletions server/public/model/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const (
DesktopClientCPUUsage MetricType = "desktop_cpu"
DesktopClientMemoryUsage MetricType = "desktop_memory"

// PluginWebappPerf is the metric type for plugin webapp performance metrics
PluginWebappPerf MetricType = "plugin_webapp_perf"

performanceReportTTLMilliseconds = 300 * 1000 // 300 seconds/5 minutes
)

Expand Down
Loading