Skip to content

Commit

Permalink
add an endpoint for sending statistics (when enabled) (#4874)
Browse files Browse the repository at this point in the history
  • Loading branch information
talSofer authored Jan 8, 2023
1 parent f5b2288 commit a3e392f
Show file tree
Hide file tree
Showing 32 changed files with 2,176 additions and 12 deletions.
53 changes: 53 additions & 0 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1138,6 +1138,33 @@ components:
description: The id of the created metarange
type: string

StatsEvent:
type: object
properties:
class:
description: stats event class (e.g. "s3_gateway", "openapi_request", "experimental-feature", "ui-event")
type: string
name:
description: stats event name (e.g. "put_object", "create_repository", "<experimental-feature-name>")
type: string
count:
description: number of events of the class and name
type: integer
required:
- class
- name
- count

StatsEventsList:
type: object
required:
- events
properties:
events:
type: array
items:
$ref: "#/components/schemas/StatsEvent"

paths:
/setup_comm_prefs:
post:
Expand Down Expand Up @@ -3783,3 +3810,29 @@ paths:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"

/statistics:
post:
tags:
- statistics
operationId: postStatsEvents
summary: post stats events, this endpoint is meant for internal use only
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/StatsEventsList"
responses:
204:
description: reported successfully
400:
description: bad request
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
401:
$ref: "#/components/responses/Unauthorized"
default:
$ref: "#/components/responses/ServerError"
3 changes: 3 additions & 0 deletions clients/java/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 73 additions & 0 deletions clients/java/api/openapi.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 93 additions & 0 deletions clients/java/docs/StatisticsApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions clients/java/docs/StatsEvent.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions clients/java/docs/StatsEventsList.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a3e392f

Please sign in to comment.