RED-8702: Explore document databases to store entityLog
* added observed
This commit is contained in:
parent
9fe3b50fe3
commit
3a5828d9f6
@ -28,6 +28,7 @@ import com.knecon.fforesight.service.layoutparser.internal.api.data.redaction.Do
|
|||||||
import com.knecon.fforesight.tenantcommons.TenantContext;
|
import com.knecon.fforesight.tenantcommons.TenantContext;
|
||||||
|
|
||||||
import io.micrometer.core.annotation.Timed;
|
import io.micrometer.core.annotation.Timed;
|
||||||
|
import io.micrometer.observation.annotation.Observed;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.SneakyThrows;
|
import lombok.SneakyThrows;
|
||||||
@ -79,6 +80,7 @@ public class RedactionStorageService {
|
|||||||
|
|
||||||
|
|
||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
|
@Observed(name = "FileManagementStorageService", contextualName = "save-entity-log")
|
||||||
public void saveEntityLog(String dossierId, String fileId, EntityLog entityLog) {
|
public void saveEntityLog(String dossierId, String fileId, EntityLog entityLog) {
|
||||||
|
|
||||||
entityLogMongoService.saveEntityLog(dossierId, fileId, entityLog);
|
entityLogMongoService.saveEntityLog(dossierId, fileId, entityLog);
|
||||||
@ -139,6 +141,7 @@ public class RedactionStorageService {
|
|||||||
|
|
||||||
|
|
||||||
@Timed("redactmanager_getRedactionLog")
|
@Timed("redactmanager_getRedactionLog")
|
||||||
|
@Observed(name = "FileManagementStorageService", contextualName = "get-entity-log")
|
||||||
public EntityLog getEntityLog(String dossierId, String fileId) {
|
public EntityLog getEntityLog(String dossierId, String fileId) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -209,6 +212,7 @@ public class RedactionStorageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Observed(name = "FileManagementStorageService", contextualName = "entity-log-exists")
|
||||||
public boolean entityLogExists(String dossierId, String fileId) {
|
public boolean entityLogExists(String dossierId, String fileId) {
|
||||||
|
|
||||||
return entityLogMongoService.entityLogDocumentExists(dossierId, fileId);
|
return entityLogMongoService.entityLogDocumentExists(dossierId, fileId);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user