Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
apollo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
apollo
Commits
98c5ddbf
Commit
98c5ddbf
authored
Aug 21, 2017
by
powerYao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CatEventType 名字修正
parent
933150a9
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
24 additions
and
25 deletions
+24
-25
AppService.java
...va/com/ctrip/framework/apollo/biz/service/AppService.java
+0
-1
RetryableRestTemplate.java
...mework/apollo/portal/component/RetryableRestTemplate.java
+3
-3
TracerEventType.java
...rip/framework/apollo/portal/constant/TracerEventType.java
+1
-1
AppService.java
...com/ctrip/framework/apollo/portal/service/AppService.java
+2
-2
ClusterService.java
...ctrip/framework/apollo/portal/service/ClusterService.java
+2
-2
ItemService.java
...om/ctrip/framework/apollo/portal/service/ItemService.java
+5
-5
NamespaceBranchService.java
...amework/apollo/portal/service/NamespaceBranchService.java
+5
-5
NamespaceService.java
...rip/framework/apollo/portal/service/NamespaceService.java
+2
-2
ReleaseService.java
...ctrip/framework/apollo/portal/service/ReleaseService.java
+2
-2
UserAccessFilter.java
...ork/apollo/portal/spi/ctrip/filters/UserAccessFilter.java
+2
-2
No files found.
apollo-biz/src/main/java/com/ctrip/framework/apollo/biz/service/AppService.java
View file @
98c5ddbf
...
@@ -5,7 +5,6 @@ import com.ctrip.framework.apollo.biz.repository.AppRepository;
...
@@ -5,7 +5,6 @@ import com.ctrip.framework.apollo.biz.repository.AppRepository;
import
com.ctrip.framework.apollo.common.entity.App
;
import
com.ctrip.framework.apollo.common.entity.App
;
import
com.ctrip.framework.apollo.common.exception.BadRequestException
;
import
com.ctrip.framework.apollo.common.exception.BadRequestException
;
import
com.ctrip.framework.apollo.common.exception.ServiceException
;
import
com.ctrip.framework.apollo.common.exception.ServiceException
;
import
com.ctrip.framework.apollo.common.utils.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/RetryableRestTemplate.java
View file @
98c5ddbf
...
@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.exception.ServiceException;
...
@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.exception.ServiceException;
import
com.ctrip.framework.apollo.core.MetaDomainConsts
;
import
com.ctrip.framework.apollo.core.MetaDomainConsts
;
import
com.ctrip.framework.apollo.core.dto.ServiceDTO
;
import
com.ctrip.framework.apollo.core.dto.ServiceDTO
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.constant.
Cat
EventType
;
import
com.ctrip.framework.apollo.portal.constant.
Tracer
EventType
;
import
com.ctrip.framework.apollo.tracer.Tracer
;
import
com.ctrip.framework.apollo.tracer.Tracer
;
import
com.ctrip.framework.apollo.tracer.spi.Transaction
;
import
com.ctrip.framework.apollo.tracer.spi.Transaction
;
...
@@ -101,7 +101,7 @@ public class RetryableRestTemplate {
...
@@ -101,7 +101,7 @@ public class RetryableRestTemplate {
logger
.
error
(
"Http request failed, uri: {}, method: {}"
,
uri
,
method
,
t
);
logger
.
error
(
"Http request failed, uri: {}, method: {}"
,
uri
,
method
,
t
);
Tracer
.
logError
(
t
);
Tracer
.
logError
(
t
);
if
(
canRetry
(
t
,
method
))
{
if
(
canRetry
(
t
,
method
))
{
Tracer
.
logEvent
(
Cat
EventType
.
API_RETRY
,
uri
);
Tracer
.
logEvent
(
Tracer
EventType
.
API_RETRY
,
uri
);
}
else
{
//biz exception rethrow
}
else
{
//biz exception rethrow
ct
.
setStatus
(
t
);
ct
.
setStatus
(
t
);
ct
.
complete
();
ct
.
complete
();
...
@@ -144,7 +144,7 @@ public class RetryableRestTemplate {
...
@@ -144,7 +144,7 @@ public class RetryableRestTemplate {
logger
.
error
(
"Http request failed, uri: {}, method: {}"
,
uri
,
HttpMethod
.
GET
,
t
);
logger
.
error
(
"Http request failed, uri: {}, method: {}"
,
uri
,
HttpMethod
.
GET
,
t
);
Tracer
.
logError
(
t
);
Tracer
.
logError
(
t
);
if
(
canRetry
(
t
,
HttpMethod
.
GET
))
{
if
(
canRetry
(
t
,
HttpMethod
.
GET
))
{
Tracer
.
logEvent
(
Cat
EventType
.
API_RETRY
,
uri
);
Tracer
.
logEvent
(
Tracer
EventType
.
API_RETRY
,
uri
);
}
else
{
// biz exception rethrow
}
else
{
// biz exception rethrow
ct
.
setStatus
(
t
);
ct
.
setStatus
(
t
);
ct
.
complete
();
ct
.
complete
();
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/constant/
Cat
EventType.java
→
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/constant/
Tracer
EventType.java
View file @
98c5ddbf
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
constant
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
constant
;
public
interface
Cat
EventType
{
public
interface
Tracer
EventType
{
String
RELEASE_NAMESPACE
=
"Namespace.Release"
;
String
RELEASE_NAMESPACE
=
"Namespace.Release"
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/AppService.java
View file @
98c5ddbf
...
@@ -8,7 +8,7 @@ import com.ctrip.framework.apollo.common.exception.BadRequestException;
...
@@ -8,7 +8,7 @@ import com.ctrip.framework.apollo.common.exception.BadRequestException;
import
com.ctrip.framework.apollo.common.utils.BeanUtils
;
import
com.ctrip.framework.apollo.common.utils.BeanUtils
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.constant.
Cat
EventType
;
import
com.ctrip.framework.apollo.portal.constant.
Tracer
EventType
;
import
com.ctrip.framework.apollo.portal.entity.bo.UserInfo
;
import
com.ctrip.framework.apollo.portal.entity.bo.UserInfo
;
import
com.ctrip.framework.apollo.portal.entity.vo.EnvClusterInfo
;
import
com.ctrip.framework.apollo.portal.entity.vo.EnvClusterInfo
;
import
com.ctrip.framework.apollo.portal.repository.AppRepository
;
import
com.ctrip.framework.apollo.portal.repository.AppRepository
;
...
@@ -101,7 +101,7 @@ public class AppService {
...
@@ -101,7 +101,7 @@ public class AppService {
appNamespaceService
.
createDefaultAppNamespace
(
appId
);
appNamespaceService
.
createDefaultAppNamespace
(
appId
);
roleInitializationService
.
initAppRoles
(
createdApp
);
roleInitializationService
.
initAppRoles
(
createdApp
);
Tracer
.
logEvent
(
Cat
EventType
.
CREATE_APP
,
appId
);
Tracer
.
logEvent
(
Tracer
EventType
.
CREATE_APP
,
appId
);
return
createdApp
;
return
createdApp
;
}
}
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/ClusterService.java
View file @
98c5ddbf
...
@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.ClusterDTO;
...
@@ -4,7 +4,7 @@ import com.ctrip.framework.apollo.common.dto.ClusterDTO;
import
com.ctrip.framework.apollo.common.exception.BadRequestException
;
import
com.ctrip.framework.apollo.common.exception.BadRequestException
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.constant.
Cat
EventType
;
import
com.ctrip.framework.apollo.portal.constant.
Tracer
EventType
;
import
com.ctrip.framework.apollo.portal.spi.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.spi.UserInfoHolder
;
import
com.ctrip.framework.apollo.tracer.Tracer
;
import
com.ctrip.framework.apollo.tracer.Tracer
;
...
@@ -31,7 +31,7 @@ public class ClusterService {
...
@@ -31,7 +31,7 @@ public class ClusterService {
}
}
ClusterDTO
clusterDTO
=
clusterAPI
.
create
(
env
,
cluster
);
ClusterDTO
clusterDTO
=
clusterAPI
.
create
(
env
,
cluster
);
Tracer
.
logEvent
(
Cat
EventType
.
CREATE_CLUSTER
,
cluster
.
getAppId
(),
"0"
,
cluster
.
getName
());
Tracer
.
logEvent
(
Tracer
EventType
.
CREATE_CLUSTER
,
cluster
.
getAppId
(),
"0"
,
cluster
.
getName
());
return
clusterDTO
;
return
clusterDTO
;
}
}
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/ItemService.java
View file @
98c5ddbf
...
@@ -11,7 +11,7 @@ import com.ctrip.framework.apollo.core.enums.Env;
...
@@ -11,7 +11,7 @@ import com.ctrip.framework.apollo.core.enums.Env;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.component.txtresolver.ConfigTextResolver
;
import
com.ctrip.framework.apollo.portal.component.txtresolver.ConfigTextResolver
;
import
com.ctrip.framework.apollo.portal.constant.
Cat
EventType
;
import
com.ctrip.framework.apollo.portal.constant.
Tracer
EventType
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceTextModel
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceTextModel
;
import
com.ctrip.framework.apollo.portal.entity.vo.ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.vo.ItemDiffs
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceIdentifier
;
import
com.ctrip.framework.apollo.portal.entity.vo.NamespaceIdentifier
;
...
@@ -73,9 +73,9 @@ public class ItemService {
...
@@ -73,9 +73,9 @@ public class ItemService {
changeSets
.
setDataChangeLastModifiedBy
(
userInfoHolder
.
getUser
().
getUserId
());
changeSets
.
setDataChangeLastModifiedBy
(
userInfoHolder
.
getUser
().
getUserId
());
updateItems
(
appId
,
env
,
clusterName
,
namespaceName
,
changeSets
);
updateItems
(
appId
,
env
,
clusterName
,
namespaceName
,
changeSets
);
Tracer
.
logEvent
(
Cat
EventType
.
MODIFY_NAMESPACE_BY_TEXT
,
Tracer
.
logEvent
(
Tracer
EventType
.
MODIFY_NAMESPACE_BY_TEXT
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
Tracer
.
logEvent
(
Cat
EventType
.
MODIFY_NAMESPACE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
Tracer
.
logEvent
(
Tracer
EventType
.
MODIFY_NAMESPACE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
}
}
public
void
updateItems
(
String
appId
,
Env
env
,
String
clusterName
,
String
namespaceName
,
ItemChangeSets
changeSets
){
public
void
updateItems
(
String
appId
,
Env
env
,
String
clusterName
,
String
namespaceName
,
ItemChangeSets
changeSets
){
...
@@ -92,7 +92,7 @@ public class ItemService {
...
@@ -92,7 +92,7 @@ public class ItemService {
item
.
setNamespaceId
(
namespace
.
getId
());
item
.
setNamespaceId
(
namespace
.
getId
());
ItemDTO
itemDTO
=
itemAPI
.
createItem
(
appId
,
env
,
clusterName
,
namespaceName
,
item
);
ItemDTO
itemDTO
=
itemAPI
.
createItem
(
appId
,
env
,
clusterName
,
namespaceName
,
item
);
Tracer
.
logEvent
(
Cat
EventType
.
MODIFY_NAMESPACE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
Tracer
.
logEvent
(
Tracer
EventType
.
MODIFY_NAMESPACE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
return
itemDTO
;
return
itemDTO
;
}
}
...
@@ -126,7 +126,7 @@ public class ItemService {
...
@@ -126,7 +126,7 @@ public class ItemService {
itemAPI
.
updateItemsByChangeSet
(
appId
,
env
,
clusterName
,
namespaceName
,
changeSets
);
itemAPI
.
updateItemsByChangeSet
(
appId
,
env
,
clusterName
,
namespaceName
,
changeSets
);
Tracer
.
logEvent
(
Cat
EventType
.
SYNC_NAMESPACE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
Tracer
.
logEvent
(
Tracer
EventType
.
SYNC_NAMESPACE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
}
}
}
}
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/NamespaceBranchService.java
View file @
98c5ddbf
...
@@ -9,7 +9,7 @@ import com.ctrip.framework.apollo.common.exception.BadRequestException;
...
@@ -9,7 +9,7 @@ import com.ctrip.framework.apollo.common.exception.BadRequestException;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.component.ItemsComparator
;
import
com.ctrip.framework.apollo.portal.component.ItemsComparator
;
import
com.ctrip.framework.apollo.portal.constant.
Cat
EventType
;
import
com.ctrip.framework.apollo.portal.constant.
Tracer
EventType
;
import
com.ctrip.framework.apollo.portal.entity.bo.NamespaceBO
;
import
com.ctrip.framework.apollo.portal.entity.bo.NamespaceBO
;
import
com.ctrip.framework.apollo.portal.spi.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.spi.UserInfoHolder
;
import
com.ctrip.framework.apollo.tracer.Tracer
;
import
com.ctrip.framework.apollo.tracer.Tracer
;
...
@@ -43,7 +43,7 @@ public class NamespaceBranchService {
...
@@ -43,7 +43,7 @@ public class NamespaceBranchService {
NamespaceDTO
createdBranch
=
namespaceBranchAPI
.
createBranch
(
appId
,
env
,
parentClusterName
,
namespaceName
,
NamespaceDTO
createdBranch
=
namespaceBranchAPI
.
createBranch
(
appId
,
env
,
parentClusterName
,
namespaceName
,
userInfoHolder
.
getUser
().
getUserId
());
userInfoHolder
.
getUser
().
getUserId
());
Tracer
.
logEvent
(
Cat
EventType
.
CREATE_GRAY_RELEASE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
parentClusterName
,
Tracer
.
logEvent
(
Tracer
EventType
.
CREATE_GRAY_RELEASE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
parentClusterName
,
namespaceName
));
namespaceName
));
return
createdBranch
;
return
createdBranch
;
...
@@ -64,7 +64,7 @@ public class NamespaceBranchService {
...
@@ -64,7 +64,7 @@ public class NamespaceBranchService {
namespaceBranchAPI
.
updateBranchGrayRules
(
appId
,
env
,
clusterName
,
namespaceName
,
branchName
,
rules
);
namespaceBranchAPI
.
updateBranchGrayRules
(
appId
,
env
,
clusterName
,
namespaceName
,
branchName
,
rules
);
Tracer
.
logEvent
(
Cat
EventType
.
UPDATE_GRAY_RELEASE_RULE
,
Tracer
.
logEvent
(
Tracer
EventType
.
UPDATE_GRAY_RELEASE_RULE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
}
}
...
@@ -75,7 +75,7 @@ public class NamespaceBranchService {
...
@@ -75,7 +75,7 @@ public class NamespaceBranchService {
namespaceBranchAPI
.
deleteBranch
(
appId
,
env
,
clusterName
,
namespaceName
,
branchName
,
operator
);
namespaceBranchAPI
.
deleteBranch
(
appId
,
env
,
clusterName
,
namespaceName
,
branchName
,
operator
);
Tracer
.
logEvent
(
Cat
EventType
.
DELETE_GRAY_RELEASE
,
Tracer
.
logEvent
(
Tracer
EventType
.
DELETE_GRAY_RELEASE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
}
}
...
@@ -90,7 +90,7 @@ public class NamespaceBranchService {
...
@@ -90,7 +90,7 @@ public class NamespaceBranchService {
releaseService
.
updateAndPublish
(
appId
,
env
,
clusterName
,
namespaceName
,
title
,
comment
,
releaseService
.
updateAndPublish
(
appId
,
env
,
clusterName
,
namespaceName
,
title
,
comment
,
branchName
,
isEmergencyPublish
,
deleteBranch
,
changeSets
);
branchName
,
isEmergencyPublish
,
deleteBranch
,
changeSets
);
Tracer
.
logEvent
(
Cat
EventType
.
MERGE_GRAY_RELEASE
,
Tracer
.
logEvent
(
Tracer
EventType
.
MERGE_GRAY_RELEASE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
return
mergedResult
;
return
mergedResult
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/NamespaceService.java
View file @
98c5ddbf
...
@@ -17,7 +17,7 @@ import com.ctrip.framework.apollo.core.enums.Env;
...
@@ -17,7 +17,7 @@ import com.ctrip.framework.apollo.core.enums.Env;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.component.PortalSettings
;
import
com.ctrip.framework.apollo.portal.component.PortalSettings
;
import
com.ctrip.framework.apollo.portal.constant.
Cat
EventType
;
import
com.ctrip.framework.apollo.portal.constant.
Tracer
EventType
;
import
com.ctrip.framework.apollo.portal.entity.bo.ItemBO
;
import
com.ctrip.framework.apollo.portal.entity.bo.ItemBO
;
import
com.ctrip.framework.apollo.portal.entity.bo.NamespaceBO
;
import
com.ctrip.framework.apollo.portal.entity.bo.NamespaceBO
;
import
com.ctrip.framework.apollo.portal.spi.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.spi.UserInfoHolder
;
...
@@ -64,7 +64,7 @@ public class NamespaceService {
...
@@ -64,7 +64,7 @@ public class NamespaceService {
namespace
.
setDataChangeLastModifiedBy
(
userInfoHolder
.
getUser
().
getUserId
());
namespace
.
setDataChangeLastModifiedBy
(
userInfoHolder
.
getUser
().
getUserId
());
NamespaceDTO
createdNamespace
=
namespaceAPI
.
createNamespace
(
env
,
namespace
);
NamespaceDTO
createdNamespace
=
namespaceAPI
.
createNamespace
(
env
,
namespace
);
Tracer
.
logEvent
(
Cat
EventType
.
CREATE_NAMESPACE
,
Tracer
.
logEvent
(
Tracer
EventType
.
CREATE_NAMESPACE
,
String
.
format
(
"%s+%s+%s+%s"
,
namespace
.
getAppId
(),
env
,
namespace
.
getClusterName
(),
String
.
format
(
"%s+%s+%s+%s"
,
namespace
.
getAppId
(),
env
,
namespace
.
getClusterName
(),
namespace
.
getNamespaceName
()));
namespace
.
getNamespaceName
()));
return
createdNamespace
;
return
createdNamespace
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/service/ReleaseService.java
View file @
98c5ddbf
...
@@ -9,7 +9,7 @@ import com.ctrip.framework.apollo.common.dto.ReleaseDTO;
...
@@ -9,7 +9,7 @@ import com.ctrip.framework.apollo.common.dto.ReleaseDTO;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.enums.Env
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.core.utils.StringUtils
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.api.AdminServiceAPI
;
import
com.ctrip.framework.apollo.portal.constant.
Cat
EventType
;
import
com.ctrip.framework.apollo.portal.constant.
Tracer
EventType
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceReleaseModel
;
import
com.ctrip.framework.apollo.portal.entity.model.NamespaceReleaseModel
;
import
com.ctrip.framework.apollo.portal.entity.bo.KVEntity
;
import
com.ctrip.framework.apollo.portal.entity.bo.KVEntity
;
import
com.ctrip.framework.apollo.portal.entity.vo.ReleaseCompareResult
;
import
com.ctrip.framework.apollo.portal.entity.vo.ReleaseCompareResult
;
...
@@ -54,7 +54,7 @@ public class ReleaseService {
...
@@ -54,7 +54,7 @@ public class ReleaseService {
model
.
getReleaseTitle
(),
model
.
getReleaseComment
(),
model
.
getReleaseTitle
(),
model
.
getReleaseComment
(),
releaseBy
,
isEmergencyPublish
);
releaseBy
,
isEmergencyPublish
);
Tracer
.
logEvent
(
Cat
EventType
.
RELEASE_NAMESPACE
,
Tracer
.
logEvent
(
Tracer
EventType
.
RELEASE_NAMESPACE
,
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
String
.
format
(
"%s+%s+%s+%s"
,
appId
,
env
,
clusterName
,
namespaceName
));
return
releaseDTO
;
return
releaseDTO
;
...
...
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/spi/ctrip/filters/UserAccessFilter.java
View file @
98c5ddbf
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
spi
.
ctrip
.
filters
;
package
com
.
ctrip
.
framework
.
apollo
.
portal
.
spi
.
ctrip
.
filters
;
import
com.ctrip.framework.apollo.portal.constant.
Cat
EventType
;
import
com.ctrip.framework.apollo.portal.constant.
Tracer
EventType
;
import
com.ctrip.framework.apollo.portal.entity.bo.UserInfo
;
import
com.ctrip.framework.apollo.portal.entity.bo.UserInfo
;
import
com.ctrip.framework.apollo.portal.spi.UserInfoHolder
;
import
com.ctrip.framework.apollo.portal.spi.UserInfoHolder
;
import
com.ctrip.framework.apollo.tracer.Tracer
;
import
com.ctrip.framework.apollo.tracer.Tracer
;
...
@@ -37,7 +37,7 @@ public class UserAccessFilter implements Filter {
...
@@ -37,7 +37,7 @@ public class UserAccessFilter implements Filter {
if
(!
isOpenAPIRequest
(
requestUri
)
&&
!
isStaticResource
(
requestUri
))
{
if
(!
isOpenAPIRequest
(
requestUri
)
&&
!
isStaticResource
(
requestUri
))
{
UserInfo
userInfo
=
userInfoHolder
.
getUser
();
UserInfo
userInfo
=
userInfoHolder
.
getUser
();
if
(
userInfo
!=
null
)
{
if
(
userInfo
!=
null
)
{
Tracer
.
logEvent
(
Cat
EventType
.
USER_ACCESS
,
userInfo
.
getUserId
());
Tracer
.
logEvent
(
Tracer
EventType
.
USER_ACCESS
,
userInfo
.
getUserId
());
}
}
}
}
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment