-
-
Notifications
You must be signed in to change notification settings - Fork 647
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-msgThankYou-oldProtocol
- Loading branch information
Showing
15 changed files
with
176 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
target_sources(${PROJECT_NAME}_lib PRIVATE | ||
di/soft_singleton.cpp | ||
logging/log_with_spd_log.cpp | ||
metrics/metrics.cpp | ||
thread/thread_pool.cpp | ||
) | ||
|
||
if(FEATURE_METRICS) | ||
target_sources(${PROJECT_NAME}_lib PRIVATE metrics/metrics.cpp) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#ifdef FEATURE_METRICS | ||
/** | ||
* Canary - A free and open-source MMORPG server emulator | ||
* Copyright (©) 2019-2024 OpenTibiaBR <[email protected]> | ||
|
@@ -7,8 +8,8 @@ | |
* Website: https://docs.opentibiabr.com/ | ||
*/ | ||
|
||
#include "metrics.hpp" | ||
#include "lib/di/container.hpp" | ||
#include "metrics.hpp" | ||
#include "lib/di/container.hpp" | ||
|
||
using namespace metrics; | ||
|
||
|
@@ -41,7 +42,7 @@ void Metrics::init(Options opts) { | |
initHistograms(); | ||
} | ||
|
||
void Metrics ::initHistograms() { | ||
void Metrics::initHistograms() { | ||
for (auto name : latencyNames) { | ||
auto instrumentSelector = metrics_sdk::InstrumentSelectorFactory::Create(metrics_sdk::InstrumentType::kHistogram, name, "us"); | ||
auto meterSelector = metrics_sdk::MeterSelectorFactory::Create("performance", otelVersion, otelSchema); | ||
|
@@ -108,3 +109,5 @@ void ScopedLatency::stop() { | |
auto attrskv = opentelemetry::common::KeyValueIterableView<decltype(attrs)> { attrs }; | ||
histogram->Record(elapsed, attrskv, context); | ||
} | ||
|
||
#endif // FEATURE_METRICS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.