mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
Adds telemetry for application startup
This commit is contained in:
1 parent
7f0ef8dbc4
commit
d3bc3c554e
2 files changed
+14
No files matched your search
@@ -16,10 +16,13 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaArgumentParser.h"
|
||||
#include "RiaMainTools.h"
|
||||
#include "RiaOpenTelemetryManager.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaQuantityInfoTools.h"
|
||||
#include "RiaStdStringTools.h"
|
||||
|
||||
#ifdef ENABLE_GRPC
|
||||
#include "RiaGrpcConsoleApplication.h"
|
||||
@@ -102,6 +105,15 @@ int main( int argc, char* argv[] )
|
||||
app->initialize();
|
||||
app->setCommandLineHelpText( cvfqt::Utils::toQString( usageText ) );
|
||||
|
||||
// Report application startup to OpenTelemetry
|
||||
{
|
||||
std::map<std::string, std::string> attributes;
|
||||
bool isConsoleMode = ( dynamic_cast<RiaGuiApplication*>( app.get() ) == nullptr );
|
||||
attributes["app.console_mode"] = RiaStdStringTools::boolToString( isConsoleMode );
|
||||
attributes["app.version"] = RiaApplication::getVersionStringApp( false );
|
||||
RiaOpenTelemetryManager::instance().reportEventAsync( "app.started", attributes );
|
||||
}
|
||||
|
||||
if ( !result )
|
||||
{
|
||||
std::vector<cvf::String> unknownOptions = progOpt.unknownOptions();
|
||||
|
||||
Reference in new issue
Block a user