Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add http metrics for gravsearch endpoints (DEV-2936) #2946

Merged
merged 79 commits into from
Dec 4, 2023

Conversation

seakayone
Copy link
Contributor

@seakayone seakayone commented Nov 18, 2023

Pull Request Checklist

Task Description/Number

Add additional metrics based on headers set from DSP-App to have a better visibility into the usage of the /v2/searchextended and /v2/searchextended/count routes for GET and POST http methods.

Achieve this by migrating endpoints to Tapir.

  • Introduces common KnoraResponseRenderer, codecs and constants in common.api package.
  • Introduces FormatOptions tapir input representing the desired combination of RdfFormat, ApiV2Schema and Rendering when rendering any rdf response

PR Type

  • build/chore: maintenance tasks (no production code change)
  • docs: documentation changes (no production code change)
  • feat: represents new features
  • fix: represents bug fixes
  • perf: performance improvements
  • refactor: represents production code refactoring
  • test: adding or refactoring tests (no production code change)

Basic requirements for bug fixes and features

  • Tests for the changes have been added
  • Docs have been added / updated

Does this PR introduce a breaking change?

  • Yes

Does this PR change client-test-data?

  • Yes

Copy link

codecov bot commented Nov 18, 2023

Codecov Report

Attention: 328 lines in your changes are missing coverage. Please review.

Comparison is base (44e6bdc) 11.63% compared to head (1829f09) 11.60%.
Report is 3 commits behind head on main.

Files Patch % Lines
...knora/webapi/messages/util/rdf/RdfFormatUtil.scala 15.38% 66 Missing ⚠️
...cala/org/knora/webapi/slice/common/api/ApiV2.scala 0.00% 47 Missing ⚠️
...nora/webapi/slice/search/api/SearchEndpoints.scala 0.00% 25 Missing ⚠️
...org/knora/webapi/messages/util/rdf/JenaModel.scala 4.16% 23 Missing ⚠️
...knora/webapi/responders/v2/SearchResponderV2.scala 0.00% 19 Missing ⚠️
...c/main/scala/org/knora/webapi/OntologySchema.scala 25.00% 18 Missing ⚠️
...n/scala/org/knora/webapi/routing/RouteUtilV2.scala 0.00% 17 Missing ⚠️
.../knora/webapi/slice/common/api/BaseEndpoints.scala 0.00% 17 Missing ⚠️
...rg/knora/webapi/messages/util/rdf/JsonLDUtil.scala 0.00% 12 Missing ⚠️
...plestore/upgrade/plugins/UpgradePluginPR1307.scala 0.00% 10 Missing ⚠️
... and 25 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2946      +/-   ##
==========================================
- Coverage   11.63%   11.60%   -0.03%     
==========================================
  Files         246      247       +1     
  Lines       22880    22893      +13     
==========================================
- Hits         2661     2657       -4     
- Misses      20219    20236      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seakayone seakayone changed the title feat: Add http metrics for search endpoints (DEV-2936) feat: Add http metrics for gravsearch endpoints (DEV-2936) Dec 1, 2023
Copy link
Contributor

@mpro7 mpro7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. Please see my comments, suggestions below:

@seakayone seakayone requested a review from mpro7 December 4, 2023 07:51
Copy link
Contributor

@BalduinLandolt BalduinLandolt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seakayone seakayone force-pushed the feat/add-http-metrics-for-search-endpoints branch 4 times, most recently from 9400083 to 5f91d01 Compare December 4, 2023 11:12
@seakayone seakayone enabled auto-merge (squash) December 4, 2023 14:15
@seakayone seakayone merged commit 7ca5946 into main Dec 4, 2023
14 checks passed
@seakayone seakayone deleted the feat/add-http-metrics-for-search-endpoints branch December 4, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants