mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
parent
565c8aa42d
commit
f1acdce42c
25
.github/workflows/server-ci-template.yml
vendored
25
.github/workflows/server-ci-template.yml
vendored
@ -207,31 +207,6 @@ jobs:
|
||||
run: make store-layers
|
||||
- name: Check generated code
|
||||
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the store layers using make store-layers"; exit 1; fi
|
||||
check-app-layers:
|
||||
name: Check app layers
|
||||
runs-on: ubuntu-22.04
|
||||
defaults:
|
||||
run:
|
||||
working-directory: server
|
||||
steps:
|
||||
- name: Checkout mattermost project
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
- name: Calculate Golang Version
|
||||
id: go
|
||||
run: echo GO_VERSION=$(cat .go-version) >> "${GITHUB_OUTPUT}"
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
|
||||
with:
|
||||
go-version: ${{ steps.go.outputs.GO_VERSION }}
|
||||
cache-dependency-path: |
|
||||
server/go.sum
|
||||
server/public/go.sum
|
||||
- name: Run setup-go-work
|
||||
run: make setup-go-work
|
||||
- name: Generate app layers
|
||||
run: make app-layers
|
||||
- name: Check generated code
|
||||
run: if [[ -n $(git status --porcelain) ]]; then echo "Please update the app layers using make app-layers"; exit 1; fi
|
||||
check-mmctl-docs:
|
||||
name: Check mmctl docs
|
||||
runs-on: ubuntu-22.04
|
||||
|
220
NOTICE.txt
220
NOTICE.txt
@ -5888,7 +5888,7 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
This product contains 'hako/durafmt' by Wesley Hill.
|
||||
|
||||
:clock8: Better time duration formatting in Go!
|
||||
:clock8: Better time duration formatting in Go!
|
||||
|
||||
* HOMEPAGE:
|
||||
* https://github.com/hako/durafmt
|
||||
@ -10106,222 +10106,6 @@ Go Client for OpenSearch
|
||||
limitations under the License.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## opentracing/opentracing-go
|
||||
|
||||
This product contains 'opentracing/opentracing-go' by OpenTracing API.
|
||||
|
||||
OpenTracing API for Go. 🛑 This library is DEPRECATED! https://github.com/opentracing/specification/issues/163
|
||||
|
||||
* HOMEPAGE:
|
||||
* http://opentracing.io
|
||||
|
||||
* LICENSE: Apache License 2.0
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2016 The OpenTracing Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## p-queue
|
||||
@ -12995,7 +12779,7 @@ Apache License
|
||||
|
||||
Version 2.0, January 2004
|
||||
|
||||
http://www.apache.org/licenses/
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
"EnableDeveloper": false,
|
||||
"DeveloperFlags": "",
|
||||
"EnableClientPerformanceDebugging": false,
|
||||
"EnableOpenTracing": false,
|
||||
"EnableSecurityFixAlert": false,
|
||||
"EnableInsecureOutgoingConnections": false,
|
||||
"AllowedUntrustedInternalConnections": "localhost",
|
||||
@ -346,7 +345,10 @@
|
||||
"LoginButtonTextColor": "#ffffff"
|
||||
},
|
||||
"NativeAppSettings": {
|
||||
"AppCustomURLSchemes": ["mmauth://", "mmauthbeta://"],
|
||||
"AppCustomURLSchemes": [
|
||||
"mmauth://",
|
||||
"mmauthbeta://"
|
||||
],
|
||||
"AppDownloadLink": "https://mattermost.com/pl/download-apps",
|
||||
"AndroidAppDownloadLink": "https://mattermost.com/pl/android-app/",
|
||||
"IosAppDownloadLink": "https://mattermost.com/pl/ios-app/"
|
||||
|
@ -35,7 +35,6 @@
|
||||
"EnableDeveloper": false,
|
||||
"DeveloperFlags": "",
|
||||
"EnableClientPerformanceDebugging": false,
|
||||
"EnableOpenTracing": false,
|
||||
"EnableSecurityFixAlert": false,
|
||||
"EnableInsecureOutgoingConnections": false,
|
||||
"AllowedUntrustedInternalConnections": "localhost",
|
||||
@ -453,7 +452,10 @@
|
||||
"LoginButtonTextColor": "#ffffff"
|
||||
},
|
||||
"NativeAppSettings": {
|
||||
"AppCustomURLSchemes": ["mmauth://", "mmauthbeta://"],
|
||||
"AppCustomURLSchemes": [
|
||||
"mmauth://",
|
||||
"mmauthbeta://"
|
||||
],
|
||||
"AppDownloadLink": "https://mattermost.com/pl/download-apps",
|
||||
"AndroidAppDownloadLink": "https://mattermost.com/pl/android-app/",
|
||||
"IosAppDownloadLink": "https://mattermost.com/pl/ios-app/"
|
||||
|
@ -120,7 +120,6 @@ const defaultServerConfig: AdminConfig = {
|
||||
EnableDeveloper: false,
|
||||
DeveloperFlags: '',
|
||||
EnableClientPerformanceDebugging: false,
|
||||
EnableOpenTracing: false,
|
||||
EnableSecurityFixAlert: true,
|
||||
EnableInsecureOutgoingConnections: false,
|
||||
AllowedUntrustedInternalConnections: '',
|
||||
|
@ -304,11 +304,6 @@ ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
endif
|
||||
endif
|
||||
|
||||
app-layers: ## Extract interface from App struct
|
||||
$(GO) install github.com/reflog/struct2interface@v0.6.1
|
||||
$(GOBIN)/struct2interface -f "channels/app" -o "channels/app/app_iface.go" -p "app" -s "App" -i "AppIface" -t ./channels/app/layer_generators/app_iface.go.tmpl
|
||||
$(GO) run ./channels/app/layer_generators -in ./channels/app/app_iface.go -out ./channels/app/opentracing/opentracing_layer.go -template ./channels/app/layer_generators/opentracing_layer.go.tmpl
|
||||
|
||||
i18n-extract: ## Extract strings for translation from the source code
|
||||
cd ../tools/mmgotool && $(GO) install .
|
||||
$(GOBIN)/mmgotool i18n extract --portal-dir=""
|
||||
|
@ -1450,7 +1450,7 @@ func hasPermissionToReadGroupMembers(c *web.Context, groupID string) *model.AppE
|
||||
//
|
||||
// err := licensedAndConfiguredForGroupBySource(c.App, group.Source)
|
||||
// err.Where = "Api4.getGroup"
|
||||
func licensedAndConfiguredForGroupBySource(app app.AppIface, source model.GroupSource) *model.AppError {
|
||||
func licensedAndConfiguredForGroupBySource(app *app.App, source model.GroupSource) *model.AppError {
|
||||
lic := app.Srv().License()
|
||||
|
||||
if lic == nil {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -51,7 +51,6 @@ func GetCommandProvider(name string) CommandProvider {
|
||||
return nil
|
||||
}
|
||||
|
||||
// @openTracingParams teamID, skipSlackParsing
|
||||
func (a *App) CreateCommandPost(c request.CTX, post *model.Post, teamID string, response *model.CommandResponse, skipSlackParsing bool) (*model.Post, *model.AppError) {
|
||||
if skipSlackParsing {
|
||||
post.Message = response.Text
|
||||
@ -81,7 +80,6 @@ func (a *App) CreateCommandPost(c request.CTX, post *model.Post, teamID string,
|
||||
return post, nil
|
||||
}
|
||||
|
||||
// @openTracingParams teamID
|
||||
// previous ListCommands now ListAutocompleteCommands
|
||||
func (a *App) ListAutocompleteCommands(teamID string, T i18n.TranslateFunc) ([]*model.Command, *model.AppError) {
|
||||
commands := make([]*model.Command, 0, 32)
|
||||
@ -179,7 +177,6 @@ func (a *App) ListAllCommands(teamID string, T i18n.TranslateFunc) ([]*model.Com
|
||||
return commands, nil
|
||||
}
|
||||
|
||||
// @openTracingParams args
|
||||
func (a *App) ExecuteCommand(c request.CTX, args *model.CommandArgs) (*model.CommandResponse, *model.AppError) {
|
||||
trigger := ""
|
||||
message := ""
|
||||
|
@ -1,12 +0,0 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// Code generated by "make app-layers"
|
||||
// DO NOT EDIT
|
||||
|
||||
package app
|
||||
|
||||
// AppIface is extracted from App struct and contains all it's exported methods. It's provided to allow partial interface passing and app layers creation.
|
||||
type AppIface interface {
|
||||
{{.Content}}
|
||||
}
|
@ -1,285 +0,0 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/ast"
|
||||
"go/parser"
|
||||
"go/token"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"regexp"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"golang.org/x/tools/imports"
|
||||
)
|
||||
|
||||
var (
|
||||
reserved = []string{"AcceptLanguage", "AccountMigration", "Cluster", "Compliance", "Context", "DataRetention", "Elasticsearch", "HTTPService", "ImageProxy", "IpAddress", "Ldap", "Log", "MessageExport", "Metrics", "Notification", "NotificationsLog", "Path", "RequestId", "Saml", "Session", "SetIpAddress", "SetRequestId", "SetSession", "SetStore", "SetT", "Srv", "Store", "T", "Timezones", "UserAgent", "SetUserAgent", "SetAcceptLanguage", "SetPath", "SetContext", "SetServer", "GetT"}
|
||||
outputFile string
|
||||
inputFile string
|
||||
outputFileTemplate string
|
||||
basicTypes = map[string]bool{"int": true, "uint": true, "string": true, "float": true, "bool": true, "byte": true, "int64": true, "uint64": true, "error": true}
|
||||
textRegexp = regexp.MustCompile(`\w+$`)
|
||||
)
|
||||
|
||||
const (
|
||||
OpenTracingParamsMarker = "@openTracingParams"
|
||||
AppErrorType = "*model.AppError"
|
||||
ErrorType = "error"
|
||||
)
|
||||
|
||||
func isError(typeName string) bool {
|
||||
return strings.Contains(typeName, AppErrorType) || strings.Contains(typeName, ErrorType)
|
||||
}
|
||||
|
||||
func init() {
|
||||
flag.StringVar(&inputFile, "in", path.Join("..", "app_iface.go"), "App interface file")
|
||||
flag.StringVar(&outputFile, "out", path.Join("..", "opentracing_layer.go"), "Output file")
|
||||
flag.StringVar(&outputFileTemplate, "template", "opentracing_layer.go.tmpl", "Output template file")
|
||||
}
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
code, err := generateLayer("OpenTracingAppLayer", outputFileTemplate)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
formattedCode, err := imports.Process(outputFile, code, &imports.Options{Comments: true})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
err = os.WriteFile(outputFile, formattedCode, 0644)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
type methodParam struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
type methodData struct {
|
||||
ParamsToTrace map[string]bool
|
||||
Params []methodParam
|
||||
Results []string
|
||||
}
|
||||
|
||||
type storeMetadata struct {
|
||||
Name string
|
||||
Methods map[string]methodData
|
||||
}
|
||||
|
||||
func fixTypeName(t string) string {
|
||||
// don't want to dive into AST to parse this, add exception
|
||||
if t == "...func(*UploadFileTask)" {
|
||||
t = "...func(*app.UploadFileTask)"
|
||||
}
|
||||
if strings.Contains(t, ".") || strings.Contains(t, "{}") || t == "map[string]any" {
|
||||
return t
|
||||
}
|
||||
typeOnly := textRegexp.FindString(t)
|
||||
|
||||
if _, basicType := basicTypes[typeOnly]; !basicType {
|
||||
t = t[:len(t)-len(typeOnly)] + "app." + typeOnly
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
||||
func formatNode(src []byte, node ast.Expr) string {
|
||||
return string(src[node.Pos()-1 : node.End()-1])
|
||||
}
|
||||
|
||||
func extractMethodMetadata(method *ast.Field, src []byte) methodData {
|
||||
params := []methodParam{}
|
||||
paramsToTrace := map[string]bool{}
|
||||
results := []string{}
|
||||
e := method.Type.(*ast.FuncType)
|
||||
if method.Doc != nil {
|
||||
for _, comment := range method.Doc.List {
|
||||
s := comment.Text
|
||||
if idx := strings.Index(s, OpenTracingParamsMarker); idx != -1 {
|
||||
for _, p := range strings.Split(s[idx+len(OpenTracingParamsMarker):], ",") {
|
||||
paramsToTrace[strings.TrimSpace(p)] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if e.Params != nil {
|
||||
for _, param := range e.Params.List {
|
||||
for _, paramName := range param.Names {
|
||||
paramType := fixTypeName(formatNode(src, param.Type))
|
||||
params = append(params, methodParam{Name: paramName.Name, Type: paramType})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if e.Results != nil {
|
||||
for _, r := range e.Results.List {
|
||||
typeStr := fixTypeName(formatNode(src, r.Type))
|
||||
|
||||
if len(r.Names) > 0 {
|
||||
for _, k := range r.Names {
|
||||
results = append(results, fmt.Sprintf("%s %s", k.Name, typeStr))
|
||||
}
|
||||
} else {
|
||||
results = append(results, typeStr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for paramName := range paramsToTrace {
|
||||
found := false
|
||||
for _, param := range params {
|
||||
if param.Name == paramName || strings.HasPrefix(paramName, param.Name+".") {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
log.Fatalf("Unable to find a parameter called '%s' (method '%s') that is mentioned in the '%s' comment. Maybe it was renamed?", paramName, method.Names[0].Name, OpenTracingParamsMarker)
|
||||
}
|
||||
}
|
||||
return methodData{Params: params, Results: results, ParamsToTrace: paramsToTrace}
|
||||
}
|
||||
|
||||
func extractStoreMetadata() (*storeMetadata, error) {
|
||||
// Create the AST by parsing src.
|
||||
fset := token.NewFileSet() // positions are relative to fset
|
||||
|
||||
file, err := os.Open(inputFile)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to open %s file: %w", inputFile, err)
|
||||
}
|
||||
src, err := io.ReadAll(file)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer file.Close()
|
||||
f, err := parser.ParseFile(fset, "../app_iface.go", src, parser.AllErrors|parser.ParseComments)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
metadata := storeMetadata{Methods: map[string]methodData{}}
|
||||
|
||||
ast.Inspect(f, func(n ast.Node) bool {
|
||||
switch x := n.(type) {
|
||||
case *ast.TypeSpec:
|
||||
if x.Name.Name == "AppIface" {
|
||||
for _, method := range x.Type.(*ast.InterfaceType).Methods.List {
|
||||
methodName := method.Names[0].Name
|
||||
found := false
|
||||
for _, reservedMethod := range reserved {
|
||||
if methodName == reservedMethod {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if found {
|
||||
continue
|
||||
}
|
||||
metadata.Methods[methodName] = extractMethodMetadata(method, src)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
})
|
||||
return &metadata, err
|
||||
}
|
||||
|
||||
func generateLayer(name, templateFile string) ([]byte, error) {
|
||||
out := bytes.NewBufferString("")
|
||||
metadata, err := extractStoreMetadata()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
metadata.Name = name
|
||||
|
||||
myFuncs := template.FuncMap{
|
||||
"joinResults": func(results []string) string {
|
||||
return strings.Join(results, ", ")
|
||||
},
|
||||
"joinResultsForSignature": func(results []string) string {
|
||||
return fmt.Sprintf("(%s)", strings.Join(results, ", "))
|
||||
},
|
||||
"genResultsVars": func(results []string) string {
|
||||
vars := make([]string, 0, len(results))
|
||||
for i := range results {
|
||||
vars = append(vars, fmt.Sprintf("resultVar%d", i))
|
||||
}
|
||||
return strings.Join(vars, ", ")
|
||||
},
|
||||
"errorToBoolean": func(results []string) string {
|
||||
for i, typeName := range results {
|
||||
if isError(typeName) {
|
||||
return fmt.Sprintf("resultVar%d == nil", i)
|
||||
}
|
||||
}
|
||||
return "true"
|
||||
},
|
||||
"errorPresent": func(results []string) bool {
|
||||
for _, typeName := range results {
|
||||
if isError(typeName) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
},
|
||||
"errorVar": func(results []string) string {
|
||||
for i, typeName := range results {
|
||||
if isError(typeName) {
|
||||
return fmt.Sprintf("resultVar%d", i)
|
||||
}
|
||||
}
|
||||
return ""
|
||||
},
|
||||
"shouldTrace": func(params map[string]bool, param string) string {
|
||||
if _, ok := params[param]; ok {
|
||||
return fmt.Sprintf(`span.SetTag("%s", %s)`, param, param)
|
||||
}
|
||||
for pName := range params {
|
||||
if strings.HasPrefix(pName, param+".") {
|
||||
return fmt.Sprintf(`span.SetTag("%s", %s)`, pName, pName)
|
||||
}
|
||||
}
|
||||
return ""
|
||||
},
|
||||
"joinParams": func(params []methodParam) string {
|
||||
paramsNames := []string{}
|
||||
for _, param := range params {
|
||||
s := param.Name
|
||||
if strings.HasPrefix(param.Type, "...") {
|
||||
s += "..."
|
||||
}
|
||||
paramsNames = append(paramsNames, s)
|
||||
}
|
||||
return strings.Join(paramsNames, ", ")
|
||||
},
|
||||
"joinParamsWithType": func(params []methodParam) string {
|
||||
paramsWithType := []string{}
|
||||
for _, param := range params {
|
||||
paramsWithType = append(paramsWithType, fmt.Sprintf("%s %s", param.Name, param.Type))
|
||||
}
|
||||
return strings.Join(paramsWithType, ", ")
|
||||
},
|
||||
}
|
||||
|
||||
t := template.Must(template.New("opentracing_layer.go.tmpl").Funcs(myFuncs).ParseFiles(templateFile))
|
||||
err = t.Execute(out, metadata)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out.Bytes(), nil
|
||||
}
|
@ -1,144 +0,0 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// Code generated by "make app-layers"
|
||||
// DO NOT EDIT
|
||||
|
||||
package opentracing
|
||||
|
||||
import (
|
||||
"github.com/opentracing/opentracing-go/ext"
|
||||
|
||||
spanlog "github.com/opentracing/opentracing-go/log"
|
||||
)
|
||||
|
||||
type {{.Name}} struct {
|
||||
app app.AppIface
|
||||
|
||||
srv *app.Server
|
||||
|
||||
log *mlog.Logger
|
||||
notificationsLog *mlog.Logger
|
||||
|
||||
accountMigration einterfaces.AccountMigrationInterface
|
||||
cluster einterfaces.ClusterInterface
|
||||
compliance einterfaces.ComplianceInterface
|
||||
dataRetention einterfaces.DataRetentionInterface
|
||||
searchEngine *searchengine.Broker
|
||||
ldap einterfaces.LdapInterface
|
||||
messageExport einterfaces.MessageExportInterface
|
||||
metrics einterfaces.MetricsInterface
|
||||
notification einterfaces.NotificationInterface
|
||||
saml einterfaces.SamlInterface
|
||||
|
||||
httpService httpservice.HTTPService
|
||||
imageProxy *imageproxy.ImageProxy
|
||||
timezones *timezones.Timezones
|
||||
|
||||
ctx context.Context
|
||||
}
|
||||
|
||||
{{range $index, $element := .Methods}}
|
||||
func (a *{{$.Name}}) {{$index}}({{$element.Params | joinParamsWithType}}) {{$element.Results | joinResultsForSignature}} {
|
||||
origCtx := a.ctx
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.{{$index}}")
|
||||
|
||||
a.ctx = newCtx
|
||||
a.app.Srv().Store().SetContext(newCtx)
|
||||
defer func() {
|
||||
a.app.Srv().Store().SetContext(origCtx)
|
||||
a.ctx = origCtx
|
||||
}()
|
||||
{{range $paramIdx, $param := $element.Params}}
|
||||
{{ shouldTrace $element.ParamsToTrace $param.Name }}
|
||||
{{end}}
|
||||
defer span.Finish()
|
||||
{{- if $element.Results | len | eq 0}}
|
||||
a.app.{{$index}}({{$element.Params | joinParams}})
|
||||
{{else}}
|
||||
{{$element.Results | genResultsVars}} := a.app.{{$index}}({{$element.Params | joinParams}})
|
||||
{{if $element.Results | errorPresent}}
|
||||
if {{$element.Results | errorVar}} != nil {
|
||||
span.LogFields(spanlog.Error({{$element.Results | errorVar}}))
|
||||
ext.Error.Set(span, true)
|
||||
}
|
||||
{{end}}
|
||||
return {{$element.Results | genResultsVars -}}
|
||||
{{end}}}
|
||||
{{end}}
|
||||
|
||||
func NewOpenTracingAppLayer(childApp app.AppIface, ctx context.Context) *{{.Name}} {
|
||||
newApp := {{.Name}}{
|
||||
app: childApp,
|
||||
ctx: ctx,
|
||||
}
|
||||
|
||||
newApp.srv = childApp.Srv()
|
||||
newApp.log = childApp.Log()
|
||||
newApp.notificationsLog = childApp.NotificationsLog()
|
||||
newApp.accountMigration = childApp.AccountMigration()
|
||||
newApp.cluster = childApp.Cluster()
|
||||
newApp.compliance = childApp.Compliance()
|
||||
newApp.dataRetention = childApp.DataRetention()
|
||||
newApp.searchEngine = childApp.SearchEngine()
|
||||
newApp.ldap = childApp.Ldap()
|
||||
newApp.messageExport = childApp.MessageExport()
|
||||
newApp.metrics = childApp.Metrics()
|
||||
newApp.notification = childApp.Notification()
|
||||
newApp.saml = childApp.Saml()
|
||||
newApp.httpService = childApp.HTTPService()
|
||||
newApp.imageProxy = childApp.ImageProxy()
|
||||
newApp.timezones = childApp.Timezones()
|
||||
|
||||
return &newApp
|
||||
}
|
||||
|
||||
|
||||
func (a *{{.Name}}) Srv() *app.Server {
|
||||
return a.srv
|
||||
}
|
||||
func (a *{{.Name}}) Log() *mlog.Logger {
|
||||
return a.log
|
||||
}
|
||||
func (a *{{.Name}}) NotificationsLog() *mlog.Logger {
|
||||
return a.notificationsLog
|
||||
}
|
||||
func (a *{{.Name}}) AccountMigration() einterfaces.AccountMigrationInterface {
|
||||
return a.accountMigration
|
||||
}
|
||||
func (a *{{.Name}}) Cluster() einterfaces.ClusterInterface {
|
||||
return a.cluster
|
||||
}
|
||||
func (a *{{.Name}}) Compliance() einterfaces.ComplianceInterface {
|
||||
return a.compliance
|
||||
}
|
||||
func (a *{{.Name}}) DataRetention() einterfaces.DataRetentionInterface {
|
||||
return a.dataRetention
|
||||
}
|
||||
func (a *{{.Name}}) Ldap() einterfaces.LdapInterface {
|
||||
return a.ldap
|
||||
}
|
||||
func (a *{{.Name}}) MessageExport() einterfaces.MessageExportInterface {
|
||||
return a.messageExport
|
||||
}
|
||||
func (a *{{.Name}}) Metrics() einterfaces.MetricsInterface {
|
||||
return a.metrics
|
||||
}
|
||||
func (a *{{.Name}}) Notification() einterfaces.NotificationInterface {
|
||||
return a.notification
|
||||
}
|
||||
func (a *{{.Name}}) Saml() einterfaces.SamlInterface {
|
||||
return a.saml
|
||||
}
|
||||
func (a *{{.Name}}) HTTPService() httpservice.HTTPService {
|
||||
return a.httpService
|
||||
}
|
||||
func (a *{{.Name}}) ImageProxy() *imageproxy.ImageProxy {
|
||||
return a.imageProxy
|
||||
}
|
||||
func (a *{{.Name}}) Timezones() *timezones.Timezones {
|
||||
return a.timezones
|
||||
}
|
||||
func (a *{{.Name}}) SetServer(srv *app.Server) {
|
||||
a.srv = srv
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ import (
|
||||
"github.com/mattermost/mattermost/server/public/shared/request"
|
||||
)
|
||||
|
||||
func PostPriorityCheckWithApp(where string, a AppIface, userId string, priority *model.PostPriority, rootId string) *model.AppError {
|
||||
func PostPriorityCheckWithApp(where string, a *App, userId string, priority *model.PostPriority, rootId string) *model.AppError {
|
||||
user, appErr := a.GetUser(userId)
|
||||
if appErr != nil {
|
||||
return appErr
|
||||
@ -84,7 +84,7 @@ func postPriorityCheck(
|
||||
return nil
|
||||
}
|
||||
|
||||
func PostHardenedModeCheckWithApp(a AppIface, isIntegration bool, props model.StringInterface) *model.AppError {
|
||||
func PostHardenedModeCheckWithApp(a *App, isIntegration bool, props model.StringInterface) *model.AppError {
|
||||
hardenedModeEnabled := *a.Config().ServiceSettings.ExperimentalEnableHardenedMode
|
||||
return postHardenedModeCheck(hardenedModeEnabled, isIntegration, props)
|
||||
}
|
||||
@ -99,7 +99,7 @@ func postHardenedModeCheck(hardenedModeEnabled, isIntegration bool, props model.
|
||||
return nil
|
||||
}
|
||||
|
||||
func userCreatePostPermissionCheckWithApp(c request.CTX, a AppIface, userId, channelId string) *model.AppError {
|
||||
func userCreatePostPermissionCheckWithApp(c request.CTX, a *App, userId, channelId string) *model.AppError {
|
||||
hasPermission := false
|
||||
if a.HasPermissionToChannel(c, userId, channelId, model.PermissionCreatePost) {
|
||||
hasPermission = true
|
||||
|
@ -74,7 +74,6 @@ import (
|
||||
"github.com/mattermost/mattermost/server/v8/platform/services/searchengine/bleveengine/indexer"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/services/sharedchannel"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/services/telemetry"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/services/tracing"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/services/upgrader"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/shared/filestore"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/shared/mail"
|
||||
@ -153,8 +152,6 @@ type Server struct {
|
||||
IPFiltering einterfaces.IPFilteringInterface
|
||||
OutgoingOAuthConnection einterfaces.OutgoingOAuthConnectionInterface
|
||||
|
||||
tracer *tracing.Tracer
|
||||
|
||||
ch *Channels
|
||||
}
|
||||
|
||||
@ -306,14 +303,6 @@ func NewServer(options ...Option) (*Server, error) {
|
||||
}
|
||||
}
|
||||
|
||||
if *s.platform.Config().ServiceSettings.EnableOpenTracing {
|
||||
tracer, err2 := tracing.New()
|
||||
if err2 != nil {
|
||||
return nil, err2
|
||||
}
|
||||
s.tracer = tracer
|
||||
}
|
||||
|
||||
s.pushNotificationClient = s.httpService.MakeClient(true)
|
||||
s.outgoingWebhookClient = s.httpService.MakeClient(false)
|
||||
|
||||
@ -689,12 +678,6 @@ func (s *Server) Shutdown() {
|
||||
s.RemoveLicenseListener(s.loggerLicenseListenerId)
|
||||
s.RemoveClusterLeaderChangedListener(s.clusterLeaderListenerId)
|
||||
|
||||
if s.tracer != nil {
|
||||
if err := s.tracer.Close(); err != nil {
|
||||
s.Log().Warn("Unable to cleanly shutdown opentracing client", mlog.Err(err))
|
||||
}
|
||||
}
|
||||
|
||||
err := s.telemetryService.Shutdown()
|
||||
if err != nil {
|
||||
s.Log().Warn("Unable to cleanly shutdown telemetry client", mlog.Err(err))
|
||||
|
@ -171,7 +171,7 @@ func ManualTest(c *web.Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
func getChannelID(a app.AppIface, channelname string, teamid string, userid string) (string, bool) {
|
||||
func getChannelID(a *app.App, channelname string, teamid string, userid string) (string, bool) {
|
||||
// Grab all the channels
|
||||
channels, err := a.Srv().Store().Channel().GetChannels(teamid, userid, &model.ChannelSearchOpts{
|
||||
IncludeDeleted: false,
|
||||
|
@ -19,8 +19,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
OpenTracingParamsMarker = "@openTracingParams"
|
||||
ErrorType = "error"
|
||||
ErrorType = "error"
|
||||
)
|
||||
|
||||
func isError(typeName string) bool {
|
||||
@ -31,9 +30,6 @@ func main() {
|
||||
if err := buildTimerLayer(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if err := buildOpenTracingLayer(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if err := buildRetryLayer(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
@ -65,28 +61,14 @@ func buildTimerLayer() error {
|
||||
return os.WriteFile(path.Join("timerlayer", "timerlayer.go"), formatedCode, 0644)
|
||||
}
|
||||
|
||||
func buildOpenTracingLayer() error {
|
||||
code, err := generateLayer("OpenTracingLayer", "opentracing_layer.go.tmpl")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
formatedCode, err := format.Source(code)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return os.WriteFile(path.Join("opentracinglayer", "opentracinglayer.go"), formatedCode, 0644)
|
||||
}
|
||||
|
||||
type methodParam struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
type methodData struct {
|
||||
Params []methodParam
|
||||
Results []string
|
||||
ParamsToTrace map[string]bool
|
||||
Params []methodParam
|
||||
Results []string
|
||||
}
|
||||
|
||||
type subStore struct {
|
||||
@ -102,20 +84,9 @@ type storeMetadata struct {
|
||||
func extractMethodMetadata(method *ast.Field, src []byte) methodData {
|
||||
params := []methodParam{}
|
||||
results := []string{}
|
||||
paramsToTrace := map[string]bool{}
|
||||
ast.Inspect(method.Type, func(expr ast.Node) bool {
|
||||
switch e := expr.(type) {
|
||||
case *ast.FuncType:
|
||||
if method.Doc != nil {
|
||||
for _, comment := range method.Doc.List {
|
||||
s := comment.Text
|
||||
if idx := strings.Index(s, OpenTracingParamsMarker); idx != -1 {
|
||||
for _, p := range strings.Split(s[idx+len(OpenTracingParamsMarker):], ",") {
|
||||
paramsToTrace[strings.TrimSpace(p)] = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if e.Params != nil {
|
||||
for _, param := range e.Params.List {
|
||||
for _, paramName := range param.Names {
|
||||
@ -128,23 +99,10 @@ func extractMethodMetadata(method *ast.Field, src []byte) methodData {
|
||||
results = append(results, string(src[result.Type.Pos()-1:result.Type.End()-1]))
|
||||
}
|
||||
}
|
||||
|
||||
for paramName := range paramsToTrace {
|
||||
found := false
|
||||
for _, param := range params {
|
||||
if param.Name == paramName {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
log.Fatalf("Unable to find a parameter called '%s' (method '%s') that is mentioned in the '%s' comment. Maybe it was renamed?", paramName, method.Names[0].Name, OpenTracingParamsMarker)
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
})
|
||||
return methodData{Params: params, Results: results, ParamsToTrace: paramsToTrace}
|
||||
return methodData{Params: params, Results: results}
|
||||
}
|
||||
|
||||
func extractStoreMetadata() (*storeMetadata, error) {
|
||||
|
@ -1,84 +0,0 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// Code generated by "make store-layers"
|
||||
// DO NOT EDIT
|
||||
|
||||
package opentracinglayer
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/request"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/services/tracing"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/store"
|
||||
"github.com/opentracing/opentracing-go/ext"
|
||||
spanlog "github.com/opentracing/opentracing-go/log"
|
||||
)
|
||||
|
||||
type {{.Name}} struct {
|
||||
store.Store
|
||||
{{range $index, $element := .SubStores}} {{$index}}Store store.{{$index}}Store
|
||||
{{end}}
|
||||
}
|
||||
|
||||
{{range $index, $element := .SubStores}}func (s *{{$.Name}}) {{$index}}() store.{{$index}}Store {
|
||||
return s.{{$index}}Store
|
||||
}
|
||||
|
||||
{{end}}
|
||||
|
||||
{{range $index, $element := .SubStores}}type {{$.Name}}{{$index}}Store struct {
|
||||
store.{{$index}}Store
|
||||
Root *{{$.Name}}
|
||||
}
|
||||
|
||||
{{end}}
|
||||
|
||||
{{range $substoreName, $substore := .SubStores}}
|
||||
{{range $index, $element := $substore.Methods}}
|
||||
func (s *{{$.Name}}{{$substoreName}}Store) {{$index}}({{$element.Params | joinParamsWithType}}) {{$element.Results | joinResultsForSignature}} {
|
||||
origCtx := s.Root.Store.Context()
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(s.Root.Store.Context(), "{{$substoreName}}Store.{{$index}}")
|
||||
s.Root.Store.SetContext(newCtx)
|
||||
defer func(){
|
||||
s.Root.Store.SetContext(origCtx)
|
||||
}()
|
||||
{{range $paramName, $param := $element.Params}}
|
||||
{{if index $element.ParamsToTrace $param.Name }}
|
||||
span.SetTag("{{$param.Name}}", {{$param.Name}})
|
||||
{{end}}
|
||||
{{end}}
|
||||
defer span.Finish()
|
||||
{{- if $element.Results | len | eq 0}}
|
||||
s.{{$substoreName}}Store.{{$index}}({{$element.Params | joinParams}})
|
||||
{{else}}
|
||||
{{genResultsVars $element.Results false }} := s.{{$substoreName}}Store.{{$index}}({{$element.Params | joinParams}})
|
||||
{{- if $element.Results | errorPresent }}
|
||||
if {{$element.Results | errorVar}} != nil {
|
||||
span.LogFields(spanlog.Error({{$element.Results | errorVar}}))
|
||||
ext.Error.Set(span, true)
|
||||
}
|
||||
{{end}}
|
||||
return {{ genResultsVars $element.Results false -}}
|
||||
{{end}}
|
||||
}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
||||
{{range $index, $element := .Methods}}
|
||||
func (s *{{$.Name}}) {{$index}}({{$element.Params | joinParamsWithType}}) {{$element.Results | joinResultsForSignature}} {
|
||||
{{if $element.Results | len | eq 0}}s.Store.{{$index}}({{$element.Params | joinParams}})
|
||||
{{else}}return s.Store.{{$index}}({{$element.Params | joinParams}})
|
||||
{{end}}}
|
||||
{{end}}
|
||||
|
||||
func New(childStore store.Store, ctx context.Context) *{{.Name}} {
|
||||
newStore := {{.Name}}{
|
||||
Store: childStore,
|
||||
}
|
||||
{{range $substoreName, $substore := .SubStores}}
|
||||
newStore.{{$substoreName}}Store = &{{$.Name}}{{$substoreName}}Store{{"{"}}{{$substoreName}}Store: childStore.{{$substoreName}}(), Root: &newStore}{{end}}
|
||||
return &newStore
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -373,7 +373,6 @@ type PostStore interface {
|
||||
PermanentDeleteByChannel(rctx request.CTX, channelID string) error
|
||||
GetPosts(options model.GetPostsOptions, allowFromCache bool, sanitizeOptions map[string]bool) (*model.PostList, error)
|
||||
GetFlaggedPosts(userID string, offset int, limit int) (*model.PostList, error)
|
||||
// @openTracingParams userID, teamID, offset, limit
|
||||
GetFlaggedPostsForTeam(userID, teamID string, offset int, limit int) (*model.PostList, error)
|
||||
GetFlaggedPostsForChannel(userID, channelID string, offset int, limit int) (*model.PostList, error)
|
||||
GetPostsBefore(options model.GetPostsOptions, sanitizeOptions map[string]bool) (*model.PostList, error)
|
||||
|
@ -19,7 +19,7 @@ import (
|
||||
)
|
||||
|
||||
type Context struct {
|
||||
App app.AppIface
|
||||
App *app.App
|
||||
AppContext request.CTX
|
||||
Logger *mlog.Logger
|
||||
Params *Params
|
||||
|
@ -16,19 +16,13 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/klauspost/compress/gzhttp"
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"github.com/opentracing/opentracing-go/ext"
|
||||
spanlog "github.com/opentracing/opentracing-go/log"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/shared/i18n"
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
"github.com/mattermost/mattermost/server/public/shared/request"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/app"
|
||||
app_opentracing "github.com/mattermost/mattermost/server/v8/channels/app/opentracing"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/store/opentracinglayer"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/utils"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/services/tracing"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -210,32 +204,6 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if *c.App.Config().ServiceSettings.EnableOpenTracing {
|
||||
span, ctx := tracing.StartRootSpanByContext(context.Background(), "web:ServeHTTP")
|
||||
carrier := opentracing.HTTPHeadersCarrier(r.Header)
|
||||
_ = opentracing.GlobalTracer().Inject(span.Context(), opentracing.HTTPHeaders, carrier)
|
||||
ext.HTTPMethod.Set(span, r.Method)
|
||||
ext.HTTPUrl.Set(span, c.AppContext.Path())
|
||||
ext.PeerAddress.Set(span, c.AppContext.IPAddress())
|
||||
span.SetTag("request_id", c.AppContext.RequestId())
|
||||
span.SetTag("user_agent", c.AppContext.UserAgent())
|
||||
|
||||
defer func() {
|
||||
if c.Err != nil {
|
||||
span.LogFields(spanlog.Error(c.Err))
|
||||
ext.HTTPStatusCode.Set(span, uint16(c.Err.StatusCode))
|
||||
ext.Error.Set(span, true)
|
||||
}
|
||||
span.Finish()
|
||||
}()
|
||||
c.AppContext = c.AppContext.WithContext(ctx)
|
||||
|
||||
tmpSrv := *c.App.Srv()
|
||||
tmpSrv.SetStore(opentracinglayer.New(c.App.Srv().Store(), ctx))
|
||||
c.App.SetServer(&tmpSrv)
|
||||
c.App = app_opentracing.NewOpenTracingAppLayer(c.App, ctx)
|
||||
}
|
||||
|
||||
var maxBytes int64
|
||||
if h.FileAPI {
|
||||
// We add a buffer of bytes.MinRead so that file sizes close to max file size
|
||||
|
@ -57,7 +57,7 @@ func CheckClientCompatibility(agentString string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func Handle404(a app.AppIface, w http.ResponseWriter, r *http.Request) {
|
||||
func Handle404(a *app.App, w http.ResponseWriter, r *http.Request) {
|
||||
err := model.NewAppError("Handle404", "api.context.404.app_error", nil, "", http.StatusNotFound)
|
||||
ipAddress := utils.GetIPAddress(r, a.Config().ServiceSettings.TrustedProxyIPHeader)
|
||||
mlog.Debug("not found handler triggered", mlog.String("path", r.URL.Path), mlog.Int("code", 404), mlog.String("ip", ipAddress))
|
||||
@ -75,19 +75,19 @@ func Handle404(a app.AppIface, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
func IsAPICall(a app.AppIface, r *http.Request) bool {
|
||||
func IsAPICall(a *app.App, r *http.Request) bool {
|
||||
subpath, _ := utils.GetSubpathFromConfig(a.Config())
|
||||
|
||||
return strings.HasPrefix(r.URL.Path, path.Join(subpath, "api")+"/")
|
||||
}
|
||||
|
||||
func IsWebhookCall(a app.AppIface, r *http.Request) bool {
|
||||
func IsWebhookCall(a *app.App, r *http.Request) bool {
|
||||
subpath, _ := utils.GetSubpathFromConfig(a.Config())
|
||||
|
||||
return strings.HasPrefix(r.URL.Path, path.Join(subpath, "hooks")+"/")
|
||||
}
|
||||
|
||||
func IsOAuthAPICall(a app.AppIface, r *http.Request) bool {
|
||||
func IsOAuthAPICall(a *app.App, r *http.Request) bool {
|
||||
subpath, _ := utils.GetSubpathFromConfig(a.Config())
|
||||
|
||||
if r.Method == "POST" && r.URL.Path == path.Join(subpath, "oauth", "authorize") {
|
||||
|
@ -31,7 +31,7 @@ var apiClient *model.Client4
|
||||
var URL string
|
||||
|
||||
type TestHelper struct {
|
||||
App app.AppIface
|
||||
App *app.App
|
||||
Context request.CTX
|
||||
Server *app.Server
|
||||
Web *Web
|
||||
|
@ -52,7 +52,6 @@ require (
|
||||
github.com/minio/minio-go/v7 v7.0.74
|
||||
github.com/oov/psd v0.0.0-20220121172623-5db5eafcecbb
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.3.0
|
||||
github.com/opentracing/opentracing-go v1.2.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/prometheus/client_golang v1.19.1
|
||||
github.com/prometheus/client_model v0.6.1
|
||||
@ -69,8 +68,6 @@ require (
|
||||
github.com/throttled/throttled v2.2.5+incompatible
|
||||
github.com/tinylib/msgp v1.2.0
|
||||
github.com/tylerb/graceful v1.2.15
|
||||
github.com/uber/jaeger-client-go v2.30.0+incompatible
|
||||
github.com/uber/jaeger-lib v2.4.1+incompatible
|
||||
github.com/vmihailenco/msgpack/v5 v5.4.1
|
||||
github.com/wiggin77/merror v1.0.5
|
||||
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c
|
||||
@ -80,14 +77,12 @@ require (
|
||||
golang.org/x/net v0.27.0
|
||||
golang.org/x/sync v0.7.0
|
||||
golang.org/x/term v0.22.0
|
||||
golang.org/x/tools v0.23.0
|
||||
gopkg.in/mail.v2 v2.3.1
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
|
||||
require (
|
||||
filippo.io/edwards25519 v1.1.0 // indirect
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
|
||||
github.com/JalfResi/justext v0.0.0-20221106200834-be571e3e3052 // indirect
|
||||
github.com/PuerkitoBio/goquery v1.9.2 // indirect
|
||||
github.com/RoaringBitmap/roaring v1.9.4 // indirect
|
||||
@ -228,6 +223,7 @@ require (
|
||||
golang.org/x/mod v0.19.0 // indirect
|
||||
golang.org/x/sys v0.24.0 // indirect
|
||||
golang.org/x/text v0.16.0 // indirect
|
||||
golang.org/x/tools v0.23.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240722135656-d784300faade // indirect
|
||||
google.golang.org/grpc v1.65.0 // indirect
|
||||
google.golang.org/protobuf v1.34.2 // indirect
|
||||
|
@ -5,7 +5,6 @@ cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgo
|
||||
code.sajari.com/docconv/v2 v2.0.0-pre.4 h1:1yQrSTah9rMSC/s1T9bq2H2j1NuRTppeApqZf2A8Zbc=
|
||||
code.sajari.com/docconv/v2 v2.0.0-pre.4/go.mod h1:+pfeEYCOA46E5fq44sh1OKEkO9hsptg8XRioeP1vvPg=
|
||||
dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
|
||||
dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
|
||||
dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
|
||||
@ -13,10 +12,7 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
|
||||
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
|
||||
git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
|
||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
|
||||
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM=
|
||||
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
|
||||
github.com/JalfResi/justext v0.0.0-20221106200834-be571e3e3052 h1:8T2zMbhLBbH9514PIQVHdsGhypMrsB4CxwbldKA9sBA=
|
||||
github.com/JalfResi/justext v0.0.0-20221106200834-be571e3e3052/go.mod h1:0SURuH1rsE8aVWvutuMZghRNrNrYEUzibzJfhEYR8L0=
|
||||
github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=
|
||||
@ -28,7 +24,6 @@ github.com/RoaringBitmap/roaring v1.9.4 h1:yhEIoH4YezLYT04s1nHehNO64EKFTop/wBhxv
|
||||
github.com/RoaringBitmap/roaring v1.9.4/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
|
||||
github.com/advancedlogic/GoOse v0.0.0-20231203033844-ae6b36caf275 h1:Kuhf+w+ilOGoXaR4O4nZ6Dp+ZS83LdANUjwyMXsPGX4=
|
||||
github.com/advancedlogic/GoOse v0.0.0-20231203033844-ae6b36caf275/go.mod h1:98NztIIMIntZGtQVIs8H85Q5b88fTbwWFbLz/lM9/xU=
|
||||
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
|
||||
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
|
||||
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
|
||||
@ -153,7 +148,6 @@ github.com/fatih/set v0.2.1/go.mod h1:+RKtMCH+favT2+3YecHGxcc0b4KyVWA1QWWJUs4E0C
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
|
||||
github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk=
|
||||
github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY=
|
||||
github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
|
||||
@ -172,7 +166,6 @@ github.com/go-asn1-ber/asn1-ber v1.5.7/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkPro
|
||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
||||
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
|
||||
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
|
||||
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
|
||||
github.com/go-ini/ini v1.67.0 h1:z6ZrTEZqSWOTyH2FlglNbNgARyHG8oLW9gMELqKr06A=
|
||||
github.com/go-ini/ini v1.67.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
|
||||
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
|
||||
@ -223,7 +216,6 @@ github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl76
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
@ -318,7 +310,6 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr
|
||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
||||
github.com/klauspost/compress v1.11.4/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
|
||||
@ -427,7 +418,6 @@ github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdh
|
||||
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
|
||||
github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
|
||||
github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
|
||||
github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc=
|
||||
github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
|
||||
@ -442,8 +432,6 @@ github.com/oov/psd v0.0.0-20220121172623-5db5eafcecbb h1:JF9kOhBBk4WPF7luXFu5yR+
|
||||
github.com/oov/psd v0.0.0-20220121172623-5db5eafcecbb/go.mod h1:GHI1bnmAcbp96z6LNfBJvtrjxhaXGkbsk967utPlvL8=
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.3.0 h1:gmQ+ILFJW6AJimivf+lHGVqCS2SCr/PBBf2Qr1xOCgE=
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.3.0/go.mod h1:+w6KAvEX3S0fVVmZciNLN0CkXhxxem26+F6Y7DoPp04=
|
||||
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
|
||||
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
|
||||
github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
|
||||
github.com/otiai10/gosseract/v2 v2.4.1 h1:G8AyBpXEeSlcq8TI85LH/pM5SXk8Djy2GEXisgyblRw=
|
||||
github.com/otiai10/gosseract/v2 v2.4.1/go.mod h1:1gNWP4Hgr2o7yqWfs6r5bZxAatjOIdqWxJLWsTsembk=
|
||||
@ -627,10 +615,6 @@ github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg=
|
||||
github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
|
||||
github.com/tylerb/graceful v1.2.15 h1:B0x01Y8fsJpogzZTkDg6BDi6eMf03s01lEKGdrv83oA=
|
||||
github.com/tylerb/graceful v1.2.15/go.mod h1:LPYTbOYmUTdabwRt0TGhLllQ0MUNbs0Y5q1WXJOI9II=
|
||||
github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o=
|
||||
github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
|
||||
github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg=
|
||||
github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
|
||||
github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/ulikunitz/xz v0.5.9/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
|
||||
github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc=
|
||||
@ -676,7 +660,6 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf
|
||||
golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
||||
@ -684,25 +667,15 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf
|
||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||
golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30=
|
||||
golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
|
||||
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
||||
golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
|
||||
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
|
||||
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
|
||||
golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
|
||||
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
|
||||
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
|
||||
golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ=
|
||||
golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E=
|
||||
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
||||
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
|
||||
golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
|
||||
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
||||
@ -756,7 +729,6 @@ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5h
|
||||
golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
@ -809,14 +781,11 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
|
||||
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
|
||||
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
||||
golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
|
||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
||||
@ -827,10 +796,6 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
|
||||
gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0=
|
||||
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
|
||||
gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
|
||||
google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
|
||||
google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y=
|
||||
@ -859,7 +824,6 @@ gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
@ -912,6 +876,5 @@ modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA=
|
||||
modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0=
|
||||
modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y=
|
||||
modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM=
|
||||
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
|
||||
sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
|
||||
sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
|
||||
|
@ -549,7 +549,6 @@ func (ts *TelemetryService) trackConfig() {
|
||||
"enable_svgs": *cfg.ServiceSettings.EnableSVGs,
|
||||
"enable_latex": *cfg.ServiceSettings.EnableLatex,
|
||||
"enable_inline_latex": *cfg.ServiceSettings.EnableInlineLatex,
|
||||
"enable_opentracing": *cfg.ServiceSettings.EnableOpenTracing,
|
||||
"enable_local_mode": *cfg.ServiceSettings.EnableLocalMode,
|
||||
"managed_resource_paths": isDefault(*cfg.ServiceSettings.ManagedResourcePaths, ""),
|
||||
"thread_auto_follow": *cfg.ServiceSettings.ThreadAutoFollow,
|
||||
|
@ -1,87 +0,0 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
package tracing
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"time"
|
||||
|
||||
opentracing "github.com/opentracing/opentracing-go"
|
||||
"github.com/uber/jaeger-client-go"
|
||||
jaegercfg "github.com/uber/jaeger-client-go/config"
|
||||
"github.com/uber/jaeger-client-go/zipkin"
|
||||
"github.com/uber/jaeger-lib/metrics"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/shared/mlog"
|
||||
)
|
||||
|
||||
// Tracer is a wrapper around Jaeger OpenTracing client, used to properly de-initialize jaeger on exit
|
||||
type Tracer struct {
|
||||
closer io.Closer
|
||||
}
|
||||
|
||||
type LogrusAdapter struct {
|
||||
}
|
||||
|
||||
// Error - logrus adapter for span errors
|
||||
func (LogrusAdapter) Error(msg string) {
|
||||
mlog.Error(msg)
|
||||
}
|
||||
|
||||
// Infof - logrus adapter for span info logging
|
||||
func (LogrusAdapter) Infof(msg string, args ...any) {
|
||||
// we ignore Info messages from opentracing
|
||||
}
|
||||
|
||||
// New instantiates Jaeger opentracing client with default options
|
||||
// To override the defaults use environment variables listed here: https://github.com/jaegertracing/jaeger-client-go/blob/master/config/config.go
|
||||
func New() (*Tracer, error) {
|
||||
cfg := jaegercfg.Configuration{
|
||||
Sampler: &jaegercfg.SamplerConfig{
|
||||
Type: jaeger.SamplerTypeConst,
|
||||
Param: 1,
|
||||
},
|
||||
Reporter: &jaegercfg.ReporterConfig{
|
||||
LogSpans: true,
|
||||
},
|
||||
}
|
||||
|
||||
zipkinPropagator := zipkin.NewZipkinB3HTTPHeaderPropagator()
|
||||
|
||||
closer, err := cfg.InitGlobalTracer(
|
||||
"mattermost",
|
||||
jaegercfg.Logger(LogrusAdapter{}),
|
||||
jaegercfg.Metrics(metrics.NullFactory),
|
||||
jaegercfg.Tag("serverStartTime", time.Now().UTC().Format(time.RFC3339)),
|
||||
jaegercfg.Injector(opentracing.HTTPHeaders, zipkinPropagator),
|
||||
jaegercfg.Extractor(opentracing.HTTPHeaders, zipkinPropagator),
|
||||
jaegercfg.ZipkinSharedRPCSpan(true),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
mlog.Info("Opentracing initialized")
|
||||
return &Tracer{
|
||||
closer: closer,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (t *Tracer) Close() error {
|
||||
return t.closer.Close()
|
||||
}
|
||||
|
||||
func StartRootSpanByContext(ctx context.Context, operationName string) (opentracing.Span, context.Context) {
|
||||
return opentracing.StartSpanFromContext(ctx, operationName)
|
||||
}
|
||||
|
||||
func StartSpanWithParentByContext(ctx context.Context, operationName string) (opentracing.Span, context.Context) {
|
||||
parentSpan := opentracing.SpanFromContext(ctx)
|
||||
|
||||
if parentSpan == nil {
|
||||
return StartRootSpanByContext(ctx, operationName)
|
||||
}
|
||||
|
||||
return opentracing.StartSpanFromContext(ctx, operationName, opentracing.ChildOf(parentSpan.Context()))
|
||||
}
|
@ -356,7 +356,6 @@ type ServiceSettings struct {
|
||||
EnableDeveloper *bool `access:"environment_developer,write_restrictable,cloud_restrictable"`
|
||||
DeveloperFlags *string `access:"environment_developer,cloud_restrictable"`
|
||||
EnableClientPerformanceDebugging *bool `access:"environment_developer,write_restrictable,cloud_restrictable"`
|
||||
EnableOpenTracing *bool `access:"write_restrictable,cloud_restrictable"`
|
||||
EnableSecurityFixAlert *bool `access:"environment_smtp,write_restrictable,cloud_restrictable"`
|
||||
EnableInsecureOutgoingConnections *bool `access:"environment_web_server,write_restrictable,cloud_restrictable"`
|
||||
AllowedUntrustedInternalConnections *string `access:"environment_web_server,write_restrictable,cloud_restrictable"`
|
||||
@ -502,10 +501,6 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) {
|
||||
s.EnableClientPerformanceDebugging = NewPointer(false)
|
||||
}
|
||||
|
||||
if s.EnableOpenTracing == nil {
|
||||
s.EnableOpenTracing = NewPointer(false)
|
||||
}
|
||||
|
||||
if s.EnableSecurityFixAlert == nil {
|
||||
s.EnableSecurityFixAlert = NewPointer(true)
|
||||
}
|
||||
|
@ -323,7 +323,6 @@ export type ServiceSettings = {
|
||||
EnableDeveloper: boolean;
|
||||
DeveloperFlags: string;
|
||||
EnableClientPerformanceDebugging: boolean;
|
||||
EnableOpenTracing: boolean;
|
||||
EnableSecurityFixAlert: boolean;
|
||||
EnableInsecureOutgoingConnections: boolean;
|
||||
AllowedUntrustedInternalConnections: string;
|
||||
|
Loading…
Reference in New Issue
Block a user