Frontend logging: Remove Sentry javascript agent support (#67493)

* remove Sentry

* fix sourcemap resolve
This commit is contained in:
Domas
2023-05-02 12:10:56 +03:00
committed by GitHub
parent 9614dc2446
commit 15d4169813
38 changed files with 47 additions and 1288 deletions
+5 -4
View File
@@ -9,13 +9,14 @@ import (
"strings"
"sync"
"github.com/getsentry/sentry-go"
sourcemap "github.com/go-sourcemap/sourcemap"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/plugins"
"github.com/grafana/grafana/pkg/setting"
)
var logger = log.New("frontendlogging")
type sourceMapLocation struct {
dir string
path string
@@ -136,7 +137,7 @@ func (store *SourceMapStore) getSourceMap(sourceURL string) (*sourceMap, error)
return smap, nil
}
func (store *SourceMapStore) resolveSourceLocation(frame sentry.Frame) (*sentry.Frame, error) {
func (store *SourceMapStore) resolveSourceLocation(frame Frame) (*Frame, error) {
smap, err := store.getSourceMap(frame.Filename)
if err != nil {
return nil, err
@@ -157,7 +158,7 @@ func (store *SourceMapStore) resolveSourceLocation(frame sentry.Frame) (*sentry.
if len(smap.pluginID) > 0 {
module = smap.pluginID
}
return &sentry.Frame{
return &Frame{
Filename: file,
Lineno: line,
Colno: col,