Skip to content

Add stubs for the absent telemetry endpoints when compiled without telemetry feature #5383

Closed
@0x009922

Description

@0x009922

Currently, when irohad (and iroha_torii) are compiled without telemetry feature, the telemetry endpoints are completely excluded from the server (/metrics, /status, /peers).

I propose to have these endpoints anyway, but return 501 Not Implemented with a text message like

This endpoint is not available on this version of irohad, as it was compiled without the telemetry feature flag.

Benefits of it:

  • Better troubleshooting for infra admins
  • Ability to handle this case precisely programmatically. For example, when Explorer tries to gather telemetry from a peer that doesn't support it, it would do so by checking the exact error message returned, instead of some not-so-explicit 404 Not Found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-changesChanges in the API for client librariesgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions