# A quote service that reports what happens through an observability
# port, and adapters that turn those events into structured log lines,
# metrics, and trace spans. Recording never fails a quote: each sink is
# guarded, and lost records are counted.
find_package(Threads REQUIRED)

add_library(adv_instrumented_service STATIC quote_service.cpp telemetry.cpp)
target_include_directories(adv_instrumented_service PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(adv_instrumented_service PUBLIC Threads::Threads)

lld_add_example(adv_instrumented_service_demo SOURCES main.cpp EXPECTED_OUTPUT expected_output.txt)
target_link_libraries(adv_instrumented_service_demo PRIVATE adv_instrumented_service)

lld_add_test(adv_instrumented_service_tests
  SOURCES tests/test_quote_service.cpp tests/test_telemetry.cpp)
target_link_libraries(adv_instrumented_service_tests PRIVATE adv_instrumented_service)
