ores.telemetry.service

Table of Contents

1. Diagram

ores.telemetry.service component diagram

Figure 1: ores.telemetry.service

2. Summary

ores.telemetry.service is the NATS service entrypoint that receives log records from other services and persists them to the telemetry database. It registers NATS handlers for log ingestion, runs the event loop, and forwards records to ores.telemetry.database for storage.

3. Inputs

  • Configuration file: NATS server URL, PostgreSQL connection string.
  • NATS messages on the six telemetry.v1.> subjects: log entries published by wrapper nodes, heartbeats from every service, and the four queries.
  • NATS server and stream samples the service polls from the NATS HTTP monitoring API.

4. Outputs

  • Log records, service samples and NATS samples persisted to the ores_telemetry schema via ores.telemetry.database.
  • Replies to the four query subjects.

5. Entry points

  • src/main.cpp, src/app/, src/config/, src/messaging/.

6. Dependencies

  • ores.telemetry.database, ores.telemetry.core, ores.service, ores.nats, ores.logging, nats.c.

7. Build dependencies

What the shared profile cannot know, declared here rather than hand-edited into the generated build file. Each block is spliced into its generated file after the profile's baseline.

8. Options

The options this service takes beyond logging, NATS and the database. Codegen writes the member, its wire field, its command-line declaration and its assignment from each entry.

8.1. nats_monitor_url

HTTP base URL of the NATS monitoring endpoint.

Defaults to localhost on the standard NATS monitoring port. Set to empty to disable NATS metrics collection.

8.2. nats_monitor_interval_seconds

How often to poll the NATS monitoring endpoint, in seconds.

9. See also

10. Test dependencies

The suites link what the profile cannot know about.

target_link_libraries(${lib_target_name}
    PUBLIC
        ores.service.lib
        ores.security.lib
        ores.telemetry.core.lib
        ores.telemetry.database.lib
        ores.nats.lib
        ores.database.lib
        ores.utility.lib
    PRIVATE
        Boost::boost)
target_link_libraries(${tests_target_name}
    PRIVATE
        ${lib_target_name}
        ores.utility.lib
        ores.testing.lib
        ores.logging.lib
        Catch2::Catch2
        faker-cxx::faker-cxx
        Threads::Threads)

Emacs 29.3 (Org mode 9.6.15)