Usage tracking provides metrics on all Rosette server calls. Call counts are provided by app-id, profileId, endpoint, and language.
To access the statistics, call the usage
endpoint:
curl http://localhost:8181/rest/usage
where localhost:8181
is the location of the Rosette installation.
Sample Response
{"no-app-id": {
"no-profile-id": {
"/rest/v1/tokens": {
"eng": {
"calls": 1
},
"zho": {
"calls": 1
}
},
"/rest/v1/categories": {
"eng": {
"calls": 1
}
},
"/rest/v1/language": {
"xxx": {
"calls": 1
}
}
}
}
}
You can also aggregate usage data by having Prometheus pull metrics from multiple instances using the usage/metrics
endpoint. A single call returns all endpoints.
curl http://localhost:8181/rest/usage/metrics
where localhost:8181
is the location of the Rosette installation.
Sample Response
# HELP rosette_http_requests_total Total number of Rosette Enterprise requests processed.
# TYPE rosette_http_requests_total counter
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/tokens",lang="zho",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/semantics/vector",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/morphology/compound-components",lang="deu",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/syntax/dependencies",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/morphology/lemmas",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/topics",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/transliteration",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/sentences",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/address-similarity",lang="xxx",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/name-deduplication",lang="xxx",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/morphology/complete",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/entities",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/name-translation",lang="xxx",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/morphology/parts-of-speech",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/semantics/similar",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/language",lang="xxx",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/sentiment",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/categories",lang="eng",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/name-similarity",lang="xxx",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/morphology/han-readings",lang="zho",} 1.0
rosette_http_requests_total{app_id="no-app-id",profile_id="no-profile-id",
endpoint="/rest/v1/relationships",lang="eng",} 1.0
Associating custom profiles with application ids
Note
As of the 1.20.0 release of Rosette Server, custom profiles are no longer associated with application ids. All custom profiles are now available to all application ids without requiring file duplication.
To require custom profiles to be installed under the application group, add the following line to the wrapper.conf
file:
wrapper.java.additional.250=-Drosapi.feature.CUSTOM_PROFILE_UNDER_APP_ID
When tracking usage in installations which utilize custom profiles, you can require that the custom profiles must be installed in subdirectories under each application group.
Example:
The app-id
identifies the group making the call. The app-id
is the value of X-RosetteAPI-App-ID
in the call header. If no application id is provided in the call header, the calls are allocated to the no-app-id
group.
The ProfileId
identifies the customized components
<app-id>/<ProfileID>/config
<app-id>/<ProfileID>/config/rosapi
<app-id>/<ProfileID>/custom-rex
If you have multiple groups (app-id
) using the same set of configuration and customizations, you can create symbolic links (ln -s <source> <link>
to save disk space. Otherwise, you will have to install the customizations under each app-id
.