mirror of
https://gitee.com/openharmony/filemanagement_dfs_service
synced 2024-10-06 21:44:01 +00:00
端到端打点,增加事务级prepareTraceId
Signed-off-by: zhangshuyi <zhangshuyi14@huawei.com>
This commit is contained in:
parent
8038b2c4a0
commit
371e28d868
@ -26,7 +26,8 @@ public:
|
||||
int32_t GetAppSwitchStatus(const std::string &bundleName, const int32_t userId, bool &switchStatus) override;
|
||||
int32_t ResolveNotificationEvent(const int32_t userId,
|
||||
const std::string &extraData,
|
||||
std::string &appBundleName) override;
|
||||
std::string &appBundleName,
|
||||
std::string &prepareTraceId) override;
|
||||
|
||||
std::shared_ptr<DataSyncManager> GetDataSyncManager() override;
|
||||
std::shared_ptr<CloudAssetsDownloader> GetCloudAssetsDownloader(const int32_t userId,
|
||||
|
@ -24,7 +24,8 @@ public:
|
||||
virtual int32_t TriggerStartSync(const std::string &bundleName,
|
||||
const int32_t userId,
|
||||
bool forceFlag,
|
||||
SyncTriggerType triggerType);
|
||||
SyncTriggerType triggerType,
|
||||
std::string prepareTraceId = "");
|
||||
};
|
||||
} // namespace OHOS::FileManagement::CloudFile
|
||||
|
||||
|
@ -47,7 +47,8 @@ int32_t CloudFileKitImpl::GetAppSwitchStatus(const std::string &bundleName,
|
||||
|
||||
int32_t CloudFileKitImpl::ResolveNotificationEvent(const int32_t userId,
|
||||
const std::string &extraData,
|
||||
std::string &appBundleName)
|
||||
std::string &appBundleName,
|
||||
std::string &prepareTraceId)
|
||||
{
|
||||
appBundleName = "com.ohos.photos";
|
||||
return E_OK;
|
||||
|
@ -21,7 +21,8 @@ using namespace std;
|
||||
int32_t DataSyncManagerImpl::TriggerStartSync(const std::string &bundleName,
|
||||
const int32_t userId,
|
||||
bool forceFlag,
|
||||
SyncTriggerType triggerType)
|
||||
SyncTriggerType triggerType,
|
||||
std::string prepareTraceId)
|
||||
{
|
||||
return E_OK;
|
||||
}
|
||||
|
@ -47,7 +47,8 @@ int32_t CloudFileKit::GetAppSwitchStatus(const std::string &bundleName, const in
|
||||
|
||||
int32_t CloudFileKit::ResolveNotificationEvent(const int32_t userId,
|
||||
const std::string &extraData,
|
||||
std::string &appBundleName)
|
||||
std::string &appBundleName,
|
||||
std::string &prepareTraceId)
|
||||
{
|
||||
appBundleName = "com.ohos.photos";
|
||||
return E_OK;
|
||||
|
@ -22,7 +22,8 @@ using namespace std;
|
||||
int32_t DataSyncManager::TriggerStartSync(const std::string &bundleName,
|
||||
const int32_t userId,
|
||||
bool forceFlag,
|
||||
SyncTriggerType triggerType)
|
||||
SyncTriggerType triggerType,
|
||||
std::string prepareTraceId)
|
||||
{
|
||||
return E_OK;
|
||||
}
|
||||
|
@ -37,7 +37,8 @@ public:
|
||||
virtual int32_t GetAppSwitchStatus(const std::string &bundleName, const int32_t userId, bool &switchStatus);
|
||||
virtual int32_t ResolveNotificationEvent(const int32_t userId,
|
||||
const std::string &extraData,
|
||||
std::string &appBundleName);
|
||||
std::string &appBundleName,
|
||||
std::string &prepareTraceId);
|
||||
virtual int32_t GetAppConfigParams(const int32_t userId,
|
||||
const std::string &bundleName,
|
||||
std::map<std::string, std::string> ¶m);
|
||||
|
@ -31,7 +31,8 @@ public:
|
||||
virtual int32_t TriggerStartSync(const std::string &bundleName,
|
||||
const int32_t userId,
|
||||
bool forceFlag,
|
||||
SyncTriggerType triggerType);
|
||||
SyncTriggerType triggerType,
|
||||
std::string prepareTraceId = "");
|
||||
virtual int32_t TriggerStopSync(const std::string &bundleName, const int32_t userId,
|
||||
bool forceFlag, SyncTriggerType triggerType);
|
||||
virtual int32_t TriggerRecoverySync(SyncTriggerType triggerType);
|
||||
|
@ -438,13 +438,15 @@ int32_t CloudSyncService::NotifyEventChange(int32_t userId, const std::string &e
|
||||
}
|
||||
|
||||
string appBundleName;
|
||||
auto ret = instance->ResolveNotificationEvent(userId, extraData, appBundleName);
|
||||
string prepareTraceId;
|
||||
auto ret = instance->ResolveNotificationEvent(userId, extraData, appBundleName, prepareTraceId);
|
||||
if (ret != E_OK) {
|
||||
LOGE("ResolveNotificationEvent failed, ret:%{public}d", ret);
|
||||
return E_CLOUD_SDK;
|
||||
}
|
||||
|
||||
return dataSyncManager_->TriggerStartSync(appBundleName, userId, false, SyncTriggerType::CLOUD_TRIGGER);
|
||||
return dataSyncManager_->TriggerStartSync(appBundleName, userId, false,
|
||||
SyncTriggerType::CLOUD_TRIGGER, prepareTraceId);
|
||||
}
|
||||
|
||||
int32_t CloudSyncService::DisableCloud(const std::string &accoutId)
|
||||
|
Loading…
Reference in New Issue
Block a user