From 7a2a1b9e84fbc8ea11c750a919468d87e6e63a9c Mon Sep 17 00:00:00 2001 From: alves Date: Tue, 23 Dec 2025 11:28:05 +0800 Subject: [PATCH] fix tags not work bug for sentry --- src/sentry_wrapper/SentryWrapper.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sentry_wrapper/SentryWrapper.cpp b/src/sentry_wrapper/SentryWrapper.cpp index ee4bd51f15..10471d2656 100644 --- a/src/sentry_wrapper/SentryWrapper.cpp +++ b/src/sentry_wrapper/SentryWrapper.cpp @@ -210,15 +210,15 @@ void initSentryEx() sentry_options_set_sample_rate(options, 1.0); sentry_options_set_traces_sample_rate(options, 1.0); - sentry_set_tag("version", Snapmaker_VERSION); + sentry_init(options); + sentry_start_session(); + + sentry_set_tag("snapmaker_version", Snapmaker_VERSION); std::string flutterVersion = common::get_flutter_version(); if (!flutterVersion.empty()) - set_sentry_tags("flutter_version", flutterVersion); + sentry_set_tag("flutter_version", flutterVersion.c_str()); - sentry_init(options); - sentry_start_session(); - //sentryReportLog(SENTRY_LOG_ERROR, "init sentry error", "initSentry module"); } }