Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
bafaf9b
Add world checksum calculation for refactoring verification
kvirund Jan 19, 2026
ef6083e
Add IWorldDataSource abstraction for pluggable world loading
kvirund Jan 19, 2026
088be39
Add SQLite world data source skeleton and OLC save support
kvirund Jan 19, 2026
ec717aa
Implement full SQLite world loading
kvirund Jan 19, 2026
b48b03f
Fix SQLite loader: UTF-8 to KOI8-R conversion, type safety, top_of_mobt
kvirund Jan 20, 2026
f1d0678
Auto-detect SQLite world.db instead of requiring -S flag
kvirund Jan 20, 2026
f130e1e
Fix SQLite loader: direction parsing and GIVE_OBJ load_prob
kvirund Jan 20, 2026
f034e34
Fix SQLite loader: mob levels, triggers, and descriptions
kvirund Jan 20, 2026
a535e36
Add utf8_to_koi unit tests and fix NO-BREAK SPACE conversion
kvirund Jan 20, 2026
69aaf37
Fix SQLite object loader: add sex field and fix level
kvirund Jan 20, 2026
0e7b7ba
Fix SQLite room zone_rn calculation and add flags to checksum
kvirund Jan 20, 2026
d3f55ef
Fix SQLite object loader: add kTrap type, max_in_world NULL, affect f…
kvirund Jan 20, 2026
50bee13
Fix SQLite object loader: cap timer at 99999 like Legacy
kvirund Jan 20, 2026
b353871
Add missing object type/flag mappings and colorLOW/colorCAP in SQLite…
kvirund Jan 21, 2026
a8e4e75
Fix object loading to match Legacy loader behavior
kvirund Jan 21, 2026
e92228d
Fix SQLite trigger loader to match Legacy checksums
kvirund Jan 21, 2026
8bd8691
Normalize SQLite loader to read integer FK columns
kvirund Jan 21, 2026
695c4e2
Add world conversion tools and update .gitignore
kvirund Jan 21, 2026
0c9ca3c
Add index file support and checksum comparison tools
kvirund Jan 21, 2026
3bac1ad
Add fail-fast when HAVE_SQLITE but world.db missing
kvirund Jan 21, 2026
300cdd9
Fix encoding corruption and refactor BootWorld with IWorldDataSource
kvirund Jan 21, 2026
6ca1739
Add world loading test scripts
kvirund Jan 22, 2026
80da6a9
Fix SQLite trigger loader: use rnum instead of vnum in constructor
kvirund Jan 22, 2026
e82bf2b
Fix converter to match Legacy loader string handling
kvirund Jan 22, 2026
94535a5
Fix object flag loading and duplicate trigger support
kvirund Jan 22, 2026
ab4ec52
Improve comparison script with encoding check and buffer diffs
kvirund Jan 22, 2026
e2b4c87
Fix zone command load_prob for EQUIP_MOB and PUT_OBJ
kvirund Jan 22, 2026
dc023fe
Add padding to ROOM_FLAGS for plane 2 offset and add tests
kvirund Jan 22, 2026
9a7cb50
Add zone.group and under_construction to SQLite loader
kvirund Jan 22, 2026
3bdb1d0
Fix liquid container/fountain weight to match Legacy
kvirund Jan 22, 2026
763efbb
Add UNUSED flag handling for anti/no/affect flags
kvirund Jan 22, 2026
2fba801
Fix object checksums: UNUSED flags, timer, kCloudly, whitespace
kvirund Jan 22, 2026
eb8ffa6
Achieve 100% object checksum match SQLite vs Legacy
kvirund Jan 22, 2026
eb290a6
Fix room name whitespace preservation
kvirund Jan 22, 2026
9fc6fe9
Fix zone checksums: preserve trailing whitespace, filter UNDEF flags
kvirund Jan 22, 2026
48e01a3
Fix room checksums and improve trigger script parsing
kvirund Jan 23, 2026
1bfd178
Fix trigger checksum mismatches and zone parsing bugs
kvirund Jan 23, 2026
17ac35e
Add OpenTelemetry observability integration
kvirund Jan 26, 2026
5685a54
Add trace_id correlation between logs and traces, heartbeat tracing
kvirund Jan 28, 2026
7840e1e
Add runtime data and temporary files to .gitignore
kvirund Jan 28, 2026
cec156d
Remove temporary files and their gitignore entries
kvirund Jan 28, 2026
a58c7f0
Add RAII helper classes for OpenTelemetry instrumentation
kvirund Jan 28, 2026
da1a559
Add OpenTelemetry instrumentation to combat system
kvirund Jan 29, 2026
57ad6c3
Add OpenTelemetry instrumentation to Mobile AI system
kvirund Jan 29, 2026
9b87d08
Add OpenTelemetry instrumentation to Player save/load system
kvirund Jan 29, 2026
ed4774f
Add OpenTelemetry instrumentation to Beat Points Update + Player Stat…
kvirund Jan 29, 2026
5b4dcda
Add OpenTelemetry instrumentation to Zone Update system
kvirund Jan 29, 2026
eea6505
Add OpenTelemetry instrumentation to Magic/Spell system
kvirund Jan 29, 2026
2aeda6e
Add OpenTelemetry instrumentation to DG Script Trigger system
kvirund Jan 29, 2026
d237880
Add OpenTelemetry instrumentation to Auction system
kvirund Jan 29, 2026
c6a80f6
Add OpenTelemetry instrumentation to Crafting system
kvirund Jan 29, 2026
3249eb0
Add Grafana dashboards for OpenTelemetry observability
kvirund Jan 29, 2026
a9f46ce
Add comprehensive OpenTelemetry instrumentation documentation
kvirund Jan 29, 2026
603e947
Reorganize observability documentation and add deployment guide
kvirund Jan 29, 2026
4702d1f
Fix server crash when port is already in use
kvirund Jan 29, 2026
bc587e3
Merge origin/master (world-load-refactoring) into metrics-traces-inst…
kvirund Feb 23, 2026
b9a9d16
Fix post-merge build errors from master integration
kvirund Feb 23, 2026
319e845
Fix CharData copy semantics: replace unique_ptr with shared_ptr for O…
kvirund Feb 23, 2026
e229b29
Fix encoding: convert otel_metrics.h and otel_traces.h from UTF-8 to …
kvirund Feb 23, 2026
d5000e8
Add observability infrastructure: docker-compose + configs
kvirund Feb 23, 2026
b20d03b
Fix Windows build: rename LogLevel enum values to avoid Windows macro…
kvirund Feb 23, 2026
b878c1f
Fix Windows/MinGW builds and add OTEL CI builds
kvirund Feb 23, 2026
3613cb7
CI: add WITH_OTEL=ON to Admin API builds instead of separate OTEL jobs
kvirund Feb 23, 2026
de8cd2a
docs: document vcpkg-based OpenTelemetry build in CLAUDE.md
kvirund Feb 23, 2026
a59181b
CI: enable universe repo for libopentelemetry-cpp-dev availability
kvirund Feb 23, 2026
bcbba7e
Fix MinGW build and OTEL CI builds
kvirund Feb 23, 2026
6c4f905
observability: configurable data dir via DATA_DIR, Loki retention 1 year
kvirund Feb 23, 2026
d858b70
observability: split data storage into base (named volumes) + overrid…
kvirund Feb 23, 2026
62c8a72
observability: update docs and add user mapping for bind mount permis…
kvirund Feb 23, 2026
20fc8f7
observability: add start.sh launch script
kvirund Feb 23, 2026
d632594
observability: start.sh defaults to 'up -d' when called without argum…
kvirund Feb 23, 2026
2254d96
observability: add install-otel-sdk.sh and document OTEL build process
kvirund Feb 23, 2026
22ad47d
observability: move Grafana host port from 3000 to 12000
kvirund Feb 23, 2026
1f118ac
observability: install vcpkg deps (zip, curl, etc.) before bootstrap
kvirund Feb 23, 2026
90fe1b7
observability: check deps instead of auto-installing with sudo
kvirund Feb 23, 2026
024c27b
observability: translate Grafana dashboards to Russian
kvirund Feb 23, 2026
4855e9b
observability: make Grafana dashboards non-editable
kvirund Feb 23, 2026
f5177dd
CI: always install libprotobuf-dev for OTEL builds (not just on cache…
kvirund Feb 23, 2026
bfe1c35
observability: add service name interpolation (${port}, ${host}, ${ve…
kvirund Feb 23, 2026
23561fc
observability: enable telemetry by default in configuration.xml
kvirund Feb 23, 2026
e0f3f75
observability: set default log mode to duplicate (file + OTEL)
kvirund Feb 23, 2026
8fe14ca
observability: fix install-otel-sdk.sh when vcpkg dir already exists
kvirund Feb 23, 2026
a83ce70
observability: add pkg-config to vcpkg dependency check
kvirund Feb 23, 2026
fb365e1
observability: install opentelemetry-cpp with otlp-http feature via v…
kvirund Feb 23, 2026
0abc5e2
observability: pass --recurse to vcpkg install for otlp-http rebuild
kvirund Feb 23, 2026
12ca6b0
observability: fix compiler warnings in heartbeat and global_objects
kvirund Feb 23, 2026
b588cc2
CI: cache Cygwin manually-built libraries (googletest, yaml-cpp)
kvirund Feb 24, 2026
d9dd92c
CI: use single Cygwin cache key for both Base and YAML jobs
kvirund Feb 24, 2026
572980e
CI: restore separate Cygwin cache keys for Base and YAML jobs
kvirund Feb 24, 2026
2416f7a
build: use gold linker on Linux
kvirund Feb 24, 2026
a6443b5
observability, build: fix UTF-8 encoding and gold linker scope
kvirund Feb 24, 2026
e2f8b58
observability: route all log() through LogManager, upgrade Loki to 3.x
kvirund Feb 25, 2026
62a19be
observability: remove hardcoded deployment.environment from otelcol c…
kvirund Feb 25, 2026
adf8c31
observability: upgrade stack to latest versions, fix trace-log correl…
kvirund Feb 25, 2026
69a68b2
observability: fix invalid UTF-8 in OTEL protobuf, add timestamps to …
kvirund Feb 25, 2026
59fd374
observability: cache iconv_t statically to avoid per-call locale lookups
kvirund Feb 26, 2026
89da977
engine: fix profiler.log path after chdir to data directory
kvirund Feb 26, 2026
28d8dad
engine: add date+time timestamps to all server startup stdout messages
kvirund Feb 26, 2026
40a90f9
engine: convert heartbeat step names to UTF-8 before sending to OTEL
kvirund Feb 26, 2026
2f8b354
observability: make NowTs inline to fix build without WITH_OTEL
kvirund Feb 26, 2026
2a89f98
utils: move NowTs to standalone timestamp.h to fix non-OTEL builds
kvirund Feb 26, 2026
3f44927
engine: use local anonymous NowTs in config.cpp to avoid include issues
kvirund Feb 26, 2026
a3f67b7
engine: fix NowTs inside WITH_OTEL guard in config.cpp
kvirund Feb 26, 2026
7854d65
observability: fix remaining UTF-8 conversion gaps in OTEL senders
kvirund Feb 26, 2026
2e33b4a
observability: fix missing koi8r_to_utf8 in OtelSpan::AddEvent
kvirund Feb 26, 2026
e658371
observability: fix remaining koi8r_to_utf8 gaps, add absl::InitializeLog
kvirund Feb 26, 2026
976fff6
observability: fix UTF-8 at OtelMetrics wrapper boundary (единая функ…
kvirund Feb 26, 2026
deba214
observability: fix Tempo->Loki correlation + service graph
kvirund Feb 26, 2026
4d9739c
observability: fix tempo metrics_generator config structure
kvirund Feb 26, 2026
e75fd14
observability: configure tempo span_metrics with buckets and dimensions
kvirund Feb 26, 2026
1ec4d08
observability: add explicit uid to Prometheus datasource
kvirund Feb 26, 2026
5ae04d5
observability: fix Tempo->Loki trace filter query
kvirund Feb 26, 2026
9266c7e
observability: fix Loki high-cardinality labels via otlp_config
kvirund Feb 26, 2026
569b7c7
observability: configure Tempo->Loki tracesToLogs with filterByTraceID
kvirund Feb 26, 2026
04572dd
observability: fix dashboards, add METRICS.md, remove outdated docs
kvirund Feb 26, 2026
f0ce99d
observability: add combat/death metrics, restore PERFORMANCE_IMPACT.md
kvirund Feb 26, 2026
8cc0254
observability: move dashboards to Примеры folder in Grafana
kvirund Feb 27, 2026
566d71b
cleanup: remove debug artifact and obsolete world-loading tools
kvirund Feb 27, 2026
053f8a3
observability: remove koi8r_to_utf8 from heartbeat call sites
kvirund Feb 27, 2026
f919e5e
observability: extract record_otel_metrics(), remove #ifdef from oper…
kvirund Feb 27, 2026
1a95afd
refactor: rename record_otel_metrics to record_metrics
kvirund Feb 27, 2026
4a7e76e
cleanup: remove redundant #ifdef WITH_OTEL from zone callers, fix Log…
kvirund Feb 27, 2026
6909511
cleanup: remove unused combat tracing fields from CharData
kvirund Feb 27, 2026
62ef0a4
cleanup: remove DualSpan and BaggageScope from otel_helpers
kvirund Feb 27, 2026
9f68b40
cleanup: fix OTel encapsulation and remove dead code
kvirund Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 54 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@ jobs:
packages: "libsqlite3-dev"
run_tests: true

- name: "Base + Admin API"
cmake_flags: "-DCMAKE_BUILD_TYPE=Release -DENABLE_ADMIN_API=ON"
- name: "Base + Admin API + OTEL"
cmake_flags: "-DCMAKE_BUILD_TYPE=Release -DENABLE_ADMIN_API=ON -DWITH_OTEL=ON -DCMAKE_PREFIX_PATH=/opt/opentelemetry-cpp"
packages: ""
run_tests: true
with_otel: true

- name: "YAML + Admin API"
cmake_flags: "-DCMAKE_BUILD_TYPE=Release -DHAVE_YAML=ON -DENABLE_ADMIN_API=ON"
- name: "YAML + Admin API + OTEL"
cmake_flags: "-DCMAKE_BUILD_TYPE=Release -DHAVE_YAML=ON -DENABLE_ADMIN_API=ON -DWITH_OTEL=ON -DCMAKE_PREFIX_PATH=/opt/opentelemetry-cpp"
packages: "libyaml-cpp-dev"
run_tests: true
with_otel: true

steps:
- uses: actions/checkout@v4
Expand All @@ -52,6 +54,7 @@ jobs:

- name: Install base dependencies
run: |
sudo add-apt-repository universe -y
sudo apt-get update
sudo apt-get install -y \
build-essential \
Expand All @@ -72,6 +75,36 @@ jobs:
run: |
sudo apt-get install -y ${{ matrix.config.packages }}

- name: Install opentelemetry-cpp runtime dependencies
if: matrix.config.with_otel
run: |
sudo apt-get install -y libprotobuf-dev

- name: Cache opentelemetry-cpp
if: matrix.config.with_otel
id: cache-otel
uses: actions/cache@v4
with:
path: /opt/opentelemetry-cpp
key: otel-cpp-1.24.0-ubuntu-x64

- name: Build opentelemetry-cpp
if: matrix.config.with_otel && steps.cache-otel.outputs.cache-hit != 'true'
run: |
sudo apt-get install -y libgrpc++-dev protobuf-compiler-grpc || true
wget -q https://github.com/open-telemetry/opentelemetry-cpp/archive/refs/tags/v1.24.0.tar.gz
tar xzf v1.24.0.tar.gz
cmake -S opentelemetry-cpp-1.24.0 -B otel-build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/opentelemetry-cpp \
-DWITH_OTLP_HTTP=ON \
-DWITH_OTLP_GRPC=OFF \
-DBUILD_TESTING=OFF \
-DWITH_BENCHMARK=OFF \
-DWITH_EXAMPLES=OFF
cmake --build otel-build -j$(nproc)
sudo cmake --install otel-build

- name: Configure CMake
run: |
mkdir -p build
Expand Down Expand Up @@ -271,7 +304,15 @@ jobs:
git
wget

- name: Cache Cygwin libraries
id: cache-cygwin-libs
uses: actions/cache@v4
with:
path: C:\cygwin\usr\local
key: cygwin-gtest-1.14.0

- name: Build and install googletest from source
if: steps.cache-cygwin-libs.outputs.cache-hit != 'true'
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
run: |
cd /tmp
Expand Down Expand Up @@ -330,7 +371,15 @@ jobs:
git
wget

- name: Cache Cygwin libraries
id: cache-cygwin-libs
uses: actions/cache@v4
with:
path: C:\cygwin\usr\local
key: cygwin-gtest-1.14.0-yaml-0.7.0

- name: Build and install googletest from source
if: steps.cache-cygwin-libs.outputs.cache-hit != 'true'
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
run: |
cd /tmp
Expand All @@ -343,6 +392,7 @@ jobs:
make install

- name: Build and install yaml-cpp from source
if: steps.cache-cygwin-libs.outputs.cache-hit != 'true'
shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
run: |
cd /tmp
Expand Down
12 changes: 12 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,22 @@ Use separate build directories for different CMake configurations to avoid lengt
build/ - default build (without optional features)
build_sqlite/ - build with -DHAVE_SQLITE=ON
build_debug/ - debug build with -DCMAKE_BUILD_TYPE=Debug
build_otel/ - build with -DWITH_OTEL=ON (requires vcpkg)
build_test/ - test data and converted worlds (not for compilation)
```
**Always warn the user when changing build directories or running cmake/make in a different directory.**

### OpenTelemetry Build (WITH_OTEL)
opentelemetry-cpp is installed via vcpkg at `~/repos/vcpkg`. Always pass the toolchain file and prefix path:
```bash
cmake -S . -B build_otel \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_OTEL=ON \
-DCMAKE_TOOLCHAIN_FILE=~/repos/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_PREFIX_PATH=~/repos/vcpkg/installed/x64-linux
make -C build_otel -j$(($(nproc)/2))
```

### File Encoding - CRITICAL
**Proper workflow for editing KOI8-R files:**

Expand Down
58 changes: 54 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)

set(SOURCES
src/engine/structs/blocking_queue.cpp
src/engine/db/influxdb.cpp
src/engine/core/heartbeat.cpp
src/engine/core/heartbeat_commands.cpp
src/gameplay/abilities/abilities_rollsystem.cpp
Expand Down Expand Up @@ -98,6 +97,8 @@ set(SOURCES
src/utils/levenshtein.cpp
src/gameplay/mechanics/liquid.cpp
src/utils/logger.cpp
src/utils/logging/file_log_sender.cpp
src/utils/logging/log_manager.cpp
src/gameplay/magic/magic.cpp
src/gameplay/magic/magic_items.cpp
src/gameplay/magic/magic_rooms.cpp
Expand Down Expand Up @@ -158,6 +159,8 @@ set(SOURCES
src/engine/structs/flags.hpp
src/utils/id_converter.cpp
src/utils/utils_time.cpp
src/utils/tracing/trace_manager.cpp
src/engine/observability/otel_trace_sender.cpp
src/utils/thread_pool.cpp
src/gameplay/mechanics/title.cpp
src/gameplay/statistics/top.cpp
Expand Down Expand Up @@ -461,7 +464,12 @@ set(SOURCES
src/engine/db/player_index.cpp
src/gameplay/skills/addshot.cpp
src/gameplay/classes/mob_classes_info.cpp
src/gameplay/classes/recalc_mob_params_by_vnum.cpp)
src/gameplay/classes/recalc_mob_params_by_vnum.cpp
src/engine/observability/otel_provider.cpp
src/engine/observability/otel_traces.cpp
src/engine/observability/otel_metrics.cpp
src/engine/observability/otel_helpers.cpp
src/engine/observability/otel_log_sender.cpp)



Expand Down Expand Up @@ -511,7 +519,6 @@ set(HEADERS
src/administration/accounts.h
src/engine/core/action_targeting.h
src/engine/structs/blocking_queue.h
src/engine/db/influxdb.h
src/engine/core/heartbeat_commands.h
src/gameplay/mechanics/weather.h
src/gameplay/core/game_limits.h
Expand Down Expand Up @@ -605,6 +612,9 @@ set(HEADERS
src/utils/levenshtein.h
src/gameplay/mechanics/liquid.h
src/utils/logger.h
src/utils/logging/log_sender.h
src/utils/logging/file_log_sender.h
src/utils/logging/log_manager.h
src/gameplay/magic/magic.h
src/gameplay/magic/magic_items.h
src/gameplay/magic/magic_rooms.h
Expand Down Expand Up @@ -662,6 +672,10 @@ set(HEADERS
src/engine/core/sysdep.h
src/engine/network/telnet.h
src/utils/utils_time.h
src/utils/tracing/trace_sender.h
src/utils/tracing/noop_trace_sender.h
src/utils/tracing/trace_manager.h
src/engine/observability/otel_trace_sender.h
src/gameplay/mechanics/title.h
src/gameplay/statistics/top.h
src/utils/utils.h
Expand Down Expand Up @@ -898,6 +912,12 @@ set(HEADERS
src/gameplay/mechanics/tutelar.h
src/gameplay/skills/addshot.h
src/engine/db/player_index.h
src/engine/observability/otel_provider.h
src/engine/observability/otel_traces.h
src/engine/observability/otel_metrics.h
src/engine/observability/otel_helpers.h
src/engine/observability/otel_log_sender.h
src/utils/logging/log_sender.h
src/gameplay/classes/recalc_mob_params_by_vnum.h)

# Build types
Expand All @@ -923,6 +943,10 @@ set(CMAKE_EXE_LINKER_FLAGS_RELEASE "")
set(CMAKE_EXE_LINKER_FLAGS_TEST "")
set(CMAKE_EXE_LINKER_FLAGS_FASTTEST "")

if (UNIX AND NOT APPLE AND NOT CYGWIN)
add_link_options(-fuse-ld=gold)
endif ()

## Look for required components
# Python
# You can specify preferred Python version using cmake command line parameter. Like this:
Expand Down Expand Up @@ -1204,6 +1228,29 @@ else ()
message(STATUS "SQLite is turned off.")
endif ()

# OpenTelemetry support
if (WITH_OTEL)
message(STATUS "OpenTelemetry integration: ENABLED")

# Find OpenTelemetry from vcpkg
find_package(opentelemetry-cpp CONFIG REQUIRED)

# Define WITH_OTEL for preprocessor
add_definitions(-DWITH_OTEL)

# Link OpenTelemetry libraries
target_link_libraries(circle.library
opentelemetry-cpp::api
opentelemetry-cpp::sdk
opentelemetry-cpp::ext
opentelemetry-cpp::otlp_http_exporter
opentelemetry-cpp::otlp_http_metric_exporter
opentelemetry-cpp::otlp_http_log_record_exporter
opentelemetry-cpp::resources
)
else()
message(STATUS "OpenTelemetry integration: DISABLED")
endif()
# YAML support
if (HAVE_YAML)
# Try to find yaml-cpp via CMake config first
Expand Down Expand Up @@ -1330,7 +1377,7 @@ if (UNIX AND NOT CYGWIN)
set(DEFAULT_WITH_ASAN YES)
else ()
set(DEFAULT_WITH_ASAN NO)
endif ()
endif()
option(WITH_ASAN "Compile with ASAN" ${DEFAULT_WITH_ASAN})

if (WITH_ASAN)
Expand Down Expand Up @@ -1450,6 +1497,9 @@ if (BUILD_TESTS)
add_subdirectory(tests)
endif ()

option(WITH_OTEL "Enable OpenTelemetry integration" OFF)

# vim: set ts=4 sw=4 ai tw=0 noet syntax=cmake :

# =============================================================================
# Data directories setup for running server from build directory
Expand Down
36 changes: 36 additions & 0 deletions lib/misc/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,40 @@
</server>
</statistics>
-->
<!--
Настройки телеметрии OpenTelemetry (OTLP HTTP).
Требует сборки с -DWITH_OTEL=ON.
Без этой сборки секция будет прочитана, но проигнорирована.

Переменные в service/name:
${port} - порт, на котором запущен сервер (из аргументов командной строки)
${host} - имя хоста (hostname)
${version} - версия сервиса (из service/version ниже)

Режимы логирования (logs/mode):
file-only - логи только в файл (по умолчанию)
otel-only - логи только в OTEL (Loki)
duplicate - логи и в файл, и в OTEL
-->
<telemetry>
<enabled>true</enabled>
<otlp>
<metrics>
<endpoint>http://localhost:4318/v1/metrics</endpoint>
</metrics>
<traces>
<endpoint>http://localhost:4318/v1/traces</endpoint>
</traces>
<logs_otlp>
<endpoint>http://localhost:4318/v1/logs</endpoint>
</logs_otlp>
</otlp>
<service>
<name>bylins-${host}-${port}</name>
<version>1.0.0</version>
</service>
<logs>
<mode>duplicate</mode>
</logs>
</telemetry>
</configuration>
Loading
Loading