From b4843e67d44558d0afe7e1f41f2ffc2d2f13d1f5 Mon Sep 17 00:00:00 2001 From: amvanbaren Date: Wed, 20 Mar 2024 14:18:03 +0200 Subject: [PATCH] Change observed endpoints Add observation for `/api/{namespace}/{extension}/{targetPlatform}` Add observation for `/api/{namespace}/{extension}/{targetPlatform}/{version}` Remove observation for `/api/-/search` Remove observation for `/api/-/query` Remove observation for `/api/v2/-/query` --- .../eclipse/openvsx/IExtensionRegistry.java | 3 +++ .../eclipse/openvsx/LocalRegistryService.java | 5 ++-- .../java/org/eclipse/openvsx/RegistryAPI.java | 5 ++-- .../openvsx/UpstreamRegistryService.java | 5 ++-- .../cache/ExtensionJsonCacheKeyGenerator.java | 3 +++ ...testExtensionVersionCacheKeyGenerator.java | 3 +++ .../repositories/ExtensionRepository.java | 2 ++ .../ExtensionVersionJooqRepository.java | 2 +- .../FileResourceJooqRepository.java | 2 ++ .../NamespaceMembershipJooqRepository.java | 2 ++ .../repositories/RepositoryService.java | 5 +++- .../openvsx/search/DatabaseSearchService.java | 26 +++++++++---------- .../openvsx/search/ElasticSearchService.java | 2 -- .../openvsx/search/ISearchService.java | 8 +++--- .../openvsx/search/SearchUtilService.java | 6 ++--- .../openvsx/storage/StorageUtilService.java | 2 ++ .../eclipse/openvsx/util/VersionService.java | 3 +++ 17 files changed, 49 insertions(+), 35 deletions(-) diff --git a/server/src/main/java/org/eclipse/openvsx/IExtensionRegistry.java b/server/src/main/java/org/eclipse/openvsx/IExtensionRegistry.java index 622b85e17..502ab03ae 100644 --- a/server/src/main/java/org/eclipse/openvsx/IExtensionRegistry.java +++ b/server/src/main/java/org/eclipse/openvsx/IExtensionRegistry.java @@ -9,6 +9,7 @@ ********************************************************************************/ package org.eclipse.openvsx; +import io.micrometer.observation.annotation.Observed; import org.eclipse.openvsx.json.*; import org.eclipse.openvsx.search.ISearchService; import org.springframework.http.ResponseEntity; @@ -20,8 +21,10 @@ public interface IExtensionRegistry { NamespaceJson getNamespace(String namespace); + @Observed ExtensionJson getExtension(String namespace, String extensionName, String targetPlatform); + @Observed ExtensionJson getExtension(String namespace, String extensionName, String targetPlatform, String version); VersionsJson getVersions(String namespace, String extension, String targetPlatform, int size, int offset); diff --git a/server/src/main/java/org/eclipse/openvsx/LocalRegistryService.java b/server/src/main/java/org/eclipse/openvsx/LocalRegistryService.java index a734386dd..e0546b491 100644 --- a/server/src/main/java/org/eclipse/openvsx/LocalRegistryService.java +++ b/server/src/main/java/org/eclipse/openvsx/LocalRegistryService.java @@ -106,12 +106,14 @@ public NamespaceJson getNamespace(String namespaceName) { } @Override + @Observed @Cacheable(value = CACHE_EXTENSION_JSON, keyGenerator = GENERATOR_EXTENSION_JSON) public ExtensionJson getExtension(String namespace, String extensionName, String targetPlatform) { return getExtension(namespace, extensionName, targetPlatform, VersionAlias.LATEST); } @Override + @Observed @Cacheable(value = CACHE_EXTENSION_JSON, keyGenerator = GENERATOR_EXTENSION_JSON) public ExtensionJson getExtension(String namespace, String extensionName, String targetPlatform, String version) { var extVersion = findExtensionVersion(namespace, extensionName, targetPlatform, version); @@ -261,7 +263,6 @@ public ReviewListJson getReviews(String namespace, String extensionName) { } @Override - @Observed public SearchResultJson search(ISearchService.Options options) { var json = new SearchResultJson(); var size = options.requestedSize; @@ -283,7 +284,6 @@ public SearchResultJson search(ISearchService.Options options) { } @Override - @Observed public QueryResultJson query(QueryRequest request) { if (!StringUtils.isEmpty(request.extensionId)) { var split = request.extensionId.split("\\."); @@ -335,7 +335,6 @@ public QueryResultJson query(QueryRequest request) { } @Override - @Observed public QueryResultJson queryV2(QueryRequestV2 request) { if (!StringUtils.isEmpty(request.extensionId)) { var split = request.extensionId.split("\\."); diff --git a/server/src/main/java/org/eclipse/openvsx/RegistryAPI.java b/server/src/main/java/org/eclipse/openvsx/RegistryAPI.java index ca816f72f..c998d71b5 100644 --- a/server/src/main/java/org/eclipse/openvsx/RegistryAPI.java +++ b/server/src/main/java/org/eclipse/openvsx/RegistryAPI.java @@ -279,6 +279,7 @@ public ResponseEntity getExtension( return new ResponseEntity<>(json, HttpStatus.NOT_FOUND); } + @Observed @GetMapping( path = "/api/{namespace}/{extension}/{targetPlatform:" + TargetPlatform.NAMES_PATH_PARAM_REGEX + "}", produces = MediaType.APPLICATION_JSON_VALUE @@ -400,6 +401,7 @@ public ResponseEntity getExtension( return new ResponseEntity<>(json, HttpStatus.NOT_FOUND); } + @Observed @GetMapping( path = "/api/{namespace}/{extension}/{targetPlatform:" + TargetPlatform.NAMES_PATH_PARAM_REGEX + "}/{version:" + VERSION_PATH_PARAM_REGEX + "}", produces = MediaType.APPLICATION_JSON_VALUE @@ -905,7 +907,6 @@ public ResponseEntity getReviews( return new ResponseEntity<>(json, HttpStatus.NOT_FOUND); } - @Observed @GetMapping( path = "/api/-/search", produces = MediaType.APPLICATION_JSON_VALUE @@ -1032,7 +1033,6 @@ private int mergeSearchResults(SearchResultJson result, List en return mergedEntries; } - @Observed @GetMapping( path = "/api/v2/-/query", produces = MediaType.APPLICATION_JSON_VALUE @@ -1145,7 +1145,6 @@ public ResponseEntity getQueryV2( .body(result); } - @Observed @GetMapping( path = "/api/-/query", produces = MediaType.APPLICATION_JSON_VALUE diff --git a/server/src/main/java/org/eclipse/openvsx/UpstreamRegistryService.java b/server/src/main/java/org/eclipse/openvsx/UpstreamRegistryService.java index d243d9c4e..0295bdfae 100644 --- a/server/src/main/java/org/eclipse/openvsx/UpstreamRegistryService.java +++ b/server/src/main/java/org/eclipse/openvsx/UpstreamRegistryService.java @@ -87,6 +87,7 @@ public ResponseEntity getNamespaceLogo(String namespaceName, String file } @Override + @Observed public ExtensionJson getExtension(String namespace, String extension, String targetPlatform) { var urlTemplate = urlConfigService.getUpstreamUrl() + "/api/{namespace}/{extension}"; var uriVariables = new HashMap(); @@ -111,6 +112,7 @@ public ExtensionJson getExtension(String namespace, String extension, String tar } @Override + @Observed public ExtensionJson getExtension(String namespace, String extension, String targetPlatform, String version) { var urlTemplate = urlConfigService.getUpstreamUrl() + "/api/{namespace}/{extension}"; var uriVariables = new HashMap(); @@ -260,7 +262,6 @@ public ReviewListJson getReviews(String namespace, String extension) { } @Override - @Observed public SearchResultJson search(ISearchService.Options options) { var urlTemplate = urlConfigService.getUpstreamUrl() + "/api/-/search"; var uriVariables = new HashMap(); @@ -295,7 +296,6 @@ public SearchResultJson search(ISearchService.Options options) { } @Override - @Observed public QueryResultJson query(QueryRequest request) { var urlTemplate = urlConfigService.getUpstreamUrl() + "/api/-/query"; var queryParams = new HashMap(); @@ -333,7 +333,6 @@ public QueryResultJson query(QueryRequest request) { } @Override - @Observed public QueryResultJson queryV2(QueryRequestV2 request) { var urlTemplate = urlConfigService.getUpstreamUrl() + "/api/v2/-/query"; var queryParams = new HashMap(); diff --git a/server/src/main/java/org/eclipse/openvsx/cache/ExtensionJsonCacheKeyGenerator.java b/server/src/main/java/org/eclipse/openvsx/cache/ExtensionJsonCacheKeyGenerator.java index 18de72dfc..d161ff768 100644 --- a/server/src/main/java/org/eclipse/openvsx/cache/ExtensionJsonCacheKeyGenerator.java +++ b/server/src/main/java/org/eclipse/openvsx/cache/ExtensionJsonCacheKeyGenerator.java @@ -9,6 +9,7 @@ * ****************************************************************************** */ package org.eclipse.openvsx.cache; +import io.micrometer.observation.annotation.Observed; import org.eclipse.openvsx.util.NamingUtil; import org.eclipse.openvsx.util.VersionAlias; import org.springframework.cache.interceptor.KeyGenerator; @@ -19,11 +20,13 @@ @Component public class ExtensionJsonCacheKeyGenerator implements KeyGenerator { @Override + @Observed public Object generate(Object target, Method method, Object... params) { var version = params.length == 4 ? (String) params[3] : VersionAlias.LATEST; return generate((String) params[0], (String) params[1], (String) params[2], version); } + @Observed public String generate(String namespaceName, String extensionName, String targetPlatform, String version) { return NamingUtil.toFileFormat(namespaceName, extensionName, version, targetPlatform); } diff --git a/server/src/main/java/org/eclipse/openvsx/cache/LatestExtensionVersionCacheKeyGenerator.java b/server/src/main/java/org/eclipse/openvsx/cache/LatestExtensionVersionCacheKeyGenerator.java index 83b0acb7a..3880a8062 100644 --- a/server/src/main/java/org/eclipse/openvsx/cache/LatestExtensionVersionCacheKeyGenerator.java +++ b/server/src/main/java/org/eclipse/openvsx/cache/LatestExtensionVersionCacheKeyGenerator.java @@ -9,6 +9,7 @@ * ****************************************************************************** */ package org.eclipse.openvsx.cache; +import io.micrometer.observation.annotation.Observed; import org.eclipse.openvsx.entities.Extension; import org.eclipse.openvsx.entities.ExtensionVersion; import org.eclipse.openvsx.util.NamingUtil; @@ -22,6 +23,7 @@ @Component public class LatestExtensionVersionCacheKeyGenerator implements KeyGenerator { @Override + @Observed public Object generate(Object target, Method method, Object... params) { Extension extension; String targetPlatform; @@ -49,6 +51,7 @@ public Object generate(Object target, Method method, Object... params) { return generate(extension, targetPlatform, preRelease, onlyActive, type); } + @Observed public String generate(Extension extension, String targetPlatform, boolean preRelease, boolean onlyActive, ExtensionVersion.Type type) { var extensionName = extension.getName(); var namespaceName = extension.getNamespace().getName(); diff --git a/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionRepository.java b/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionRepository.java index e2d73510a..4502b4a0e 100644 --- a/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionRepository.java +++ b/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionRepository.java @@ -9,6 +9,7 @@ ********************************************************************************/ package org.eclipse.openvsx.repositories; +import io.micrometer.observation.annotation.Observed; import org.eclipse.openvsx.entities.Extension; import org.eclipse.openvsx.entities.Namespace; import org.eclipse.openvsx.entities.UserData; @@ -29,6 +30,7 @@ public interface ExtensionRepository extends Repository { Extension findByNameIgnoreCaseAndNamespace(String name, Namespace namespace); + @Observed Extension findByNameIgnoreCaseAndNamespaceNameIgnoreCase(String name, String namespace); Extension findByPublicId(String publicId); diff --git a/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionVersionJooqRepository.java b/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionVersionJooqRepository.java index 47637919b..21003984e 100644 --- a/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionVersionJooqRepository.java +++ b/server/src/main/java/org/eclipse/openvsx/repositories/ExtensionVersionJooqRepository.java @@ -226,6 +226,7 @@ public List findActiveVersionReferencesSorted(Collection findVersionStringsSorted(Long extensionId, String targetPlatform, boolean onlyActive, int numberOfRows) { var conditions = new ArrayList(); conditions.add(EXTENSION_VERSION.EXTENSION_ID.eq(extensionId)); @@ -268,7 +269,6 @@ private List findVersionStringsSorted(List conditions, Pageab return versionsQuery.fetch(record -> record.get(EXTENSION_VERSION.VERSION)); } - @Observed public Page findActiveVersions(QueryRequest request) { var conditions = new ArrayList(); if (!StringUtils.isEmpty(request.namespaceUuid)) { diff --git a/server/src/main/java/org/eclipse/openvsx/repositories/FileResourceJooqRepository.java b/server/src/main/java/org/eclipse/openvsx/repositories/FileResourceJooqRepository.java index cd9745c84..28b69c8f0 100644 --- a/server/src/main/java/org/eclipse/openvsx/repositories/FileResourceJooqRepository.java +++ b/server/src/main/java/org/eclipse/openvsx/repositories/FileResourceJooqRepository.java @@ -9,6 +9,7 @@ * ****************************************************************************** */ package org.eclipse.openvsx.repositories; +import io.micrometer.observation.annotation.Observed; import org.eclipse.openvsx.entities.ExtensionVersion; import org.eclipse.openvsx.entities.FileResource; import org.jooq.DSLContext; @@ -30,6 +31,7 @@ public class FileResourceJooqRepository { @Autowired DSLContext dsl; + @Observed public List findByType(Collection extVersions, Collection types) { if(extVersions.isEmpty() || types.isEmpty()) { return Collections.emptyList(); diff --git a/server/src/main/java/org/eclipse/openvsx/repositories/NamespaceMembershipJooqRepository.java b/server/src/main/java/org/eclipse/openvsx/repositories/NamespaceMembershipJooqRepository.java index 7b251c542..7ca7b0b2b 100644 --- a/server/src/main/java/org/eclipse/openvsx/repositories/NamespaceMembershipJooqRepository.java +++ b/server/src/main/java/org/eclipse/openvsx/repositories/NamespaceMembershipJooqRepository.java @@ -9,6 +9,7 @@ ********************************************************************************/ package org.eclipse.openvsx.repositories; +import io.micrometer.observation.annotation.Observed; import org.eclipse.openvsx.entities.Namespace; import org.eclipse.openvsx.entities.NamespaceMembership; import org.eclipse.openvsx.entities.UserData; @@ -57,6 +58,7 @@ private NamespaceMembership toNamespaceMembership(Record record) { return namespaceMembership; } + @Observed public boolean isVerified(Namespace namespace, UserData user) { var nm = NAMESPACE_MEMBERSHIP.as("nm"); var onm = NAMESPACE_MEMBERSHIP.as("onm"); diff --git a/server/src/main/java/org/eclipse/openvsx/repositories/RepositoryService.java b/server/src/main/java/org/eclipse/openvsx/repositories/RepositoryService.java index 80f592c48..0f5f97214 100644 --- a/server/src/main/java/org/eclipse/openvsx/repositories/RepositoryService.java +++ b/server/src/main/java/org/eclipse/openvsx/repositories/RepositoryService.java @@ -79,6 +79,7 @@ public Extension findExtension(String name, Namespace namespace) { return extensionRepo.findByNameIgnoreCaseAndNamespace(name, namespace); } + @Observed public Extension findExtension(String name, String namespace) { return extensionRepo.findByNameIgnoreCaseAndNamespaceNameIgnoreCase(name, namespace); } @@ -155,6 +156,7 @@ public Page findActiveVersionStringsSorted(String namespace, String exte return extensionVersionJooqRepo.findActiveVersionStringsSorted(namespace, extension, targetPlatform, page); } + @Observed public List findVersionStringsSorted(Extension extension, String targetPlatform, boolean onlyActive) { return extensionVersionJooqRepo.findVersionStringsSorted(extension.getId(), targetPlatform, onlyActive, MAX_VERSIONS); } @@ -219,6 +221,7 @@ public FileResource findFileByType(ExtensionVersion extVersion, String type) { return fileResourceRepo.findByExtensionAndType(extVersion, type); } + @Observed public List findFilesByType(Collection extVersions, Collection types) { return fileResourceJooqRepo.findByType(extVersions, types); } @@ -259,6 +262,7 @@ public NamespaceMembership findMembership(UserData user, Namespace namespace) { return membershipRepo.findByUserAndNamespace(user, namespace); } + @Observed public boolean isVerified(Namespace namespace, UserData user) { return membershipJooqRepo.isVerified(namespace, user); } @@ -319,7 +323,6 @@ public List findActiveExtensionsById(Collection ids) { return extensionJooqRepo.findAllActiveById(ids); } - @Observed public Page findActiveVersions(QueryRequest request) { return extensionVersionJooqRepo.findActiveVersions(request); } diff --git a/server/src/main/java/org/eclipse/openvsx/search/DatabaseSearchService.java b/server/src/main/java/org/eclipse/openvsx/search/DatabaseSearchService.java index 28054fe34..5fe07319c 100644 --- a/server/src/main/java/org/eclipse/openvsx/search/DatabaseSearchService.java +++ b/server/src/main/java/org/eclipse/openvsx/search/DatabaseSearchService.java @@ -10,25 +10,26 @@ package org.eclipse.openvsx.search; -import java.util.*; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -import io.micrometer.observation.annotation.Observed; +import jakarta.transaction.Transactional; +import org.eclipse.openvsx.entities.Extension; +import org.eclipse.openvsx.repositories.RepositoryService; +import org.eclipse.openvsx.search.RelevanceService.SearchStats; import org.eclipse.openvsx.util.TargetPlatform; import org.eclipse.openvsx.util.VersionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.data.elasticsearch.core.*; -import org.springframework.scheduling.annotation.Async; -import org.springframework.stereotype.Component; -import org.eclipse.openvsx.entities.Extension; -import org.eclipse.openvsx.repositories.RepositoryService; -import org.eclipse.openvsx.search.RelevanceService.SearchStats; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; +import org.springframework.data.elasticsearch.core.SearchHit; +import org.springframework.data.elasticsearch.core.SearchHits; +import org.springframework.data.elasticsearch.core.SearchHitsImpl; +import org.springframework.data.elasticsearch.core.TotalHitsRelation; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; -import jakarta.transaction.Transactional; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.Stream; import static org.eclipse.openvsx.cache.CacheService.CACHE_AVERAGE_REVIEW_RATING; import static org.eclipse.openvsx.cache.CacheService.CACHE_DATABASE_SEARCH; @@ -55,7 +56,6 @@ public boolean isEnabled() { @Autowired VersionService versions; - @Observed @Transactional @Cacheable(CACHE_DATABASE_SEARCH) @CacheEvict(value = CACHE_AVERAGE_REVIEW_RATING, allEntries = true) diff --git a/server/src/main/java/org/eclipse/openvsx/search/ElasticSearchService.java b/server/src/main/java/org/eclipse/openvsx/search/ElasticSearchService.java index 82f4b6be1..e91711bff 100644 --- a/server/src/main/java/org/eclipse/openvsx/search/ElasticSearchService.java +++ b/server/src/main/java/org/eclipse/openvsx/search/ElasticSearchService.java @@ -14,7 +14,6 @@ import co.elastic.clients.elasticsearch._types.query_dsl.BoolQuery; import co.elastic.clients.elasticsearch._types.query_dsl.QueryBuilders; import co.elastic.clients.util.ObjectBuilder; -import io.micrometer.observation.annotation.Observed; import org.apache.commons.lang3.StringUtils; import org.eclipse.openvsx.entities.Extension; import org.eclipse.openvsx.migration.HandlerJobRequest; @@ -251,7 +250,6 @@ public void removeSearchEntry(Extension extension) { } } - @Observed public SearchHits search(Options options) { var resultWindow = options.requestedOffset + options.requestedSize; if(resultWindow > getMaxResultWindow()) { diff --git a/server/src/main/java/org/eclipse/openvsx/search/ISearchService.java b/server/src/main/java/org/eclipse/openvsx/search/ISearchService.java index 3fcd76b92..b91150964 100644 --- a/server/src/main/java/org/eclipse/openvsx/search/ISearchService.java +++ b/server/src/main/java/org/eclipse/openvsx/search/ISearchService.java @@ -9,15 +9,14 @@ ********************************************************************************/ package org.eclipse.openvsx.search; +import org.eclipse.openvsx.entities.Extension; +import org.springframework.data.elasticsearch.core.SearchHits; + import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Objects; -import io.micrometer.observation.annotation.Observed; -import org.springframework.data.elasticsearch.core.SearchHits; -import org.eclipse.openvsx.entities.Extension; - /** * Common interface for all search service implementations. */ @@ -31,7 +30,6 @@ public interface ISearchService { /** * Search with given options */ - @Observed SearchHits search(Options options); /** diff --git a/server/src/main/java/org/eclipse/openvsx/search/SearchUtilService.java b/server/src/main/java/org/eclipse/openvsx/search/SearchUtilService.java index bc86d25c7..ed24dea0e 100644 --- a/server/src/main/java/org/eclipse/openvsx/search/SearchUtilService.java +++ b/server/src/main/java/org/eclipse/openvsx/search/SearchUtilService.java @@ -10,11 +10,10 @@ package org.eclipse.openvsx.search; -import io.micrometer.observation.annotation.Observed; +import org.eclipse.openvsx.entities.Extension; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; import org.springframework.data.elasticsearch.core.SearchHits; -import org.eclipse.openvsx.entities.Extension; +import org.springframework.stereotype.Component; import java.util.Collection; import java.util.List; @@ -55,7 +54,6 @@ protected ISearchService getImplementation() { } - @Observed public SearchHits search(ElasticSearchService.Options options) { return getImplementation().search(options); } diff --git a/server/src/main/java/org/eclipse/openvsx/storage/StorageUtilService.java b/server/src/main/java/org/eclipse/openvsx/storage/StorageUtilService.java index cf5e42236..beac9a159 100644 --- a/server/src/main/java/org/eclipse/openvsx/storage/StorageUtilService.java +++ b/server/src/main/java/org/eclipse/openvsx/storage/StorageUtilService.java @@ -10,6 +10,7 @@ package org.eclipse.openvsx.storage; import com.google.common.collect.Maps; +import io.micrometer.observation.annotation.Observed; import org.apache.commons.lang3.StringUtils; import org.eclipse.openvsx.cache.CacheService; import org.eclipse.openvsx.entities.ExtensionVersion; @@ -257,6 +258,7 @@ public Map getFileUrls(ExtensionVersion extVersion, String serve /** * Returns URLs for the given file types as a map of ExtensionVersion.id by a map of type by file URL, to be used in JSON response data. */ + @Observed public Map> getFileUrls(Collection extVersions, String serverUrl, String... types) { var type2Url = extVersions.stream() .map(ev -> new AbstractMap.SimpleEntry>(ev.getId(), Maps.newLinkedHashMapWithExpectedSize(types.length))) diff --git a/server/src/main/java/org/eclipse/openvsx/util/VersionService.java b/server/src/main/java/org/eclipse/openvsx/util/VersionService.java index bed255b12..a564bf408 100644 --- a/server/src/main/java/org/eclipse/openvsx/util/VersionService.java +++ b/server/src/main/java/org/eclipse/openvsx/util/VersionService.java @@ -9,6 +9,7 @@ * ****************************************************************************** */ package org.eclipse.openvsx.util; +import io.micrometer.observation.annotation.Observed; import org.eclipse.openvsx.entities.Extension; import org.eclipse.openvsx.entities.ExtensionVersion; import org.springframework.beans.factory.annotation.Autowired; @@ -34,6 +35,7 @@ public class VersionService { * @return list of ExtensionVersion. */ @Transactional + @Observed public List getVersionsTrxn(Extension extension) { extension = entityManager.merge(extension); var versions = extension.getVersions(); @@ -51,6 +53,7 @@ public List getVersionsTrxn(Extension extension) { * @return the latest ExtensionVersion. */ @Transactional + @Observed @Cacheable(value = CACHE_LATEST_EXTENSION_VERSION, keyGenerator = GENERATOR_LATEST_EXTENSION_VERSION) public ExtensionVersion getLatestTrxn(Extension extension, String targetPlatform, boolean onlyPreRelease, boolean onlyActive) { extension = entityManager.merge(extension);