Skip to content

Export metrics  #108

@rhamzeh

Description

@rhamzeh

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 JS API library https://github.com/open-telemetry/opentelemetry-js/tree/main/api

Expose only from the inner OpenFgaApi. We need to be able to get these metrics:

  • The latency of the request, split into
    • time it took since dev called the method until they get a response
    • time it took since the sdk issued a request to the API until it got a response
    • time reported by the server (query_duration_ms header)
  • Response codes
  • Error codes and method
  • Method calls

See here for examples on usage:

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions