mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-04 08:18:34 +00:00
feat(BRIDGE-396): Observability metrics for vault issues; Extension to observability service to support caching
This commit is contained in:
@ -168,6 +168,7 @@ func New(
|
||||
updater Updater, // the updater to fetch and install updates
|
||||
curVersion *semver.Version, // the current version of the bridge
|
||||
keychains *keychain.List, // usable keychains
|
||||
obsService *observability.Service,
|
||||
|
||||
apiURL string, // the URL of the API to use
|
||||
cookieJar http.CookieJar, // the cookie jar to use
|
||||
@ -206,6 +207,7 @@ func New(
|
||||
keychains,
|
||||
panicHandler,
|
||||
reporter,
|
||||
obsService,
|
||||
|
||||
api,
|
||||
identifier,
|
||||
@ -242,6 +244,7 @@ func newBridge(
|
||||
keychains *keychain.List,
|
||||
panicHandler async.PanicHandler,
|
||||
reporter reporter.Reporter,
|
||||
obsService *observability.Service,
|
||||
|
||||
api *proton.Manager,
|
||||
identifier identifier.Identifier,
|
||||
@ -275,7 +278,7 @@ func newBridge(
|
||||
|
||||
unleashService := unleash.NewBridgeService(ctx, api, locator, panicHandler, vault.GetFeatureFlagStickyKey())
|
||||
|
||||
observabilityService := observability.NewService(ctx, panicHandler)
|
||||
obsService.Initialize(ctx, panicHandler)
|
||||
|
||||
bridge := &Bridge{
|
||||
vault: vault,
|
||||
@ -317,11 +320,11 @@ func newBridge(
|
||||
lastVersion: lastVersion,
|
||||
|
||||
tasks: tasks,
|
||||
syncService: syncservice.NewService(panicHandler, observabilityService),
|
||||
syncService: syncservice.NewService(panicHandler, obsService),
|
||||
|
||||
unleashService: unleashService,
|
||||
|
||||
observabilityService: observabilityService,
|
||||
observabilityService: obsService,
|
||||
|
||||
notificationStore: notifications.NewStore(locator.ProvideNotificationsCachePath),
|
||||
|
||||
@ -336,7 +339,7 @@ func newBridge(
|
||||
reporter,
|
||||
uidValidityGenerator,
|
||||
&bridgeIMAPSMTPTelemetry{b: bridge},
|
||||
observabilityService,
|
||||
obsService,
|
||||
unleashService,
|
||||
)
|
||||
|
||||
|
||||
@ -45,6 +45,7 @@ import (
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/focus"
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/locations"
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/services/imapsmtpserver"
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/services/observability"
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/unleash"
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/updater"
|
||||
"github.com/ProtonMail/proton-bridge/v3/internal/user"
|
||||
@ -944,6 +945,7 @@ func withBridgeNoMocks(
|
||||
mocks.Updater,
|
||||
v2_3_0,
|
||||
keychain.NewTestKeychainsList(),
|
||||
observability.NewTestService(),
|
||||
|
||||
// The API stuff.
|
||||
apiURL,
|
||||
|
||||
Reference in New Issue
Block a user