api key statistics skywalking

27 views Asked by At

Hello everyone There is an application on node.js, how do I build and display a dashboard based on endpoint usage statistics with separate api keys? My app on node.js 16 + postgres + skywalking. For example, requests:

  • GET /some-endpoint (headers: {x-api-key: "apiKey_1})
  • GET /some-endpoint (headers: {x-api-key: "apiKey_1})
  • GET /some-endpoint (headers: {x-api-key: "apiKey_1})
  • GET /some-endpoint (headers: {x-api-key: "apiKey_2}) `

Desired statistics:

  • /some-endpoint (apiKey_1) 3
  • /some-endpoint (apiKey_2) 1

i just tried research information and did not found any.

1

There are 1 answers

0
Sheng Wu On

There is not an out-of-box way to do so. But, you could custom the plugin codes to read the header, and build your style of operation name of the span, then the OAP backend would run the statistics according to the new names.