Closed rhamzeh closed 4 months ago
As a consumer of the SDK, I would like to hook it to my dashboards to get data on several metrics.
Integrate the OpenTelemetry Python API https://github.com/open-telemetry/opentelemetry-python/tree/main/opentelemetry-api (API docs)
Expose only from the inner OpenFgaApi. We need to be able to report the following metrics
fga-client.request.duration
fga-client.query.duration
fga-client.credentials.request
And the metrics should have the following attributes associated with them
fga-client.response.model_id
string
fga-client.request.method
fga-client.request.store_id
fga-client.request.model_id
fga-client.request.client_id
fga-client.user
http.status_code
int
http.method
http.host
We should create an overall meter for OpenFgaApi and then create counters, histograms as required for each metric we report.
For the semantically named attributes we can use the semantic conventions package https://pypi.org/project/opentelemetry-semantic-conventions/
Checklist
Describe the problem you'd like to have solved
As a consumer of the SDK, I would like to hook it to my dashboards to get data on several metrics.
Describe the ideal solution
Integrate the OpenTelemetry Python API https://github.com/open-telemetry/opentelemetry-python/tree/main/opentelemetry-api (API docs)
Expose only from the inner OpenFgaApi. We need to be able to report the following metrics
fga-client.request.duration
fga-client.query.duration
fga-client.credentials.request
And the metrics should have the following attributes associated with them
fga-client.response.model_id
string
fga-client.request.method
string
fga-client.request.store_id
string
fga-client.request.model_id
string
fga-client.request.client_id
string
fga-client.user
string
http.status_code
int
http.method
string
http.host
string
We should create an overall meter for OpenFgaApi and then create counters, histograms as required for each metric we report.
For the semantically named attributes we can use the semantic conventions package https://pypi.org/project/opentelemetry-semantic-conventions/