telefonicaid / telefonicaid/iotagent-node-lib

Metrics API: Common Metrics

Open
#528 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
62
Forks
90
Avg merge
2h 35m
Merged PRs (30d)
1

Description

This issue is about implementing the basic API metrics operations, along with the first batch of counters (the common ones for all the IoTP components).

Operations to implement:

GET <host:port>/admin/metrics
DELETE <host:port>/admin/metrics
GET <host:port>/admin/metrics?reset=true (maybe, yet under discussion)

Syntax:

{
    "service": {
        "service1": {
            "subservs": {
                "subserv1": {},
                "subserv2": {},
                "subserv3": {}
            },
            "sum": {}
        },
        "service2": {
            "subservs": {
                "subserv1": {},
                "subserv2": {},
                "subserv3": {}
            },
            "sum": {}
        },
        "service3": {
            "subservs": {
                "subserv1": {},
                "subserv2": {},
                "subserv3": {}
            },
            "sum": {}
        }
    },
    "sum": {
        "subservs": {
            "subserv1": {},
            "subserv2": {},
            "subserv3": {}
        },
        "sum": {}
    }
}

Metrics to implement:

  • incomingTransactions: number of requests consumed by the component.
  • incomingTransactionRequestSize: total size (bytes) in requests associated to incoming transactions (“in” from the point of view of the component).
  • incomingTransactionResponseSize: total size (bytes) in responses associated to incoming transactions (“out” from the point of view of the component).
  • incomingTransacionError: number of incoming transactions resulting in error.
  • serviceTime: average time to serve a transaction.
  • outgoingTransactions: number of requests sent by the component.
  • outgoingTransactionRequestSize: total size (bytes) in requests associated to outgoing transactions (“out” from the point of view of the component).
  • outgoingTransactionResponseSize: total size (bytes) in responses associated to outgoing transactions (“in” from the point of view of the component).
  • outgoingTransacionError: number of outgoing transactions resulting in error.

Note: all incoming/outgoing channels count for the above metrics.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing admin API entry point and the component's incoming and outgoing transaction channels. Implement and verify the GET and DELETE metrics operations, with the documented common counters and response structure; treat the reset=true behavior as unresolved until its discussion is settled.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.