From fb98c23c2c9ecec37a1edf86df8585877289eddd Mon Sep 17 00:00:00 2001 From: Jelle Spijker Date: Sun, 17 Dec 2023 17:03:30 +0100 Subject: [PATCH] Add Sentry tagging for engine plugins The change introduces Sentry tagging for engine plugins in the ArcusCommunication module. This enhancement aids in better tracking and debugging by attaching the plugin's name and version as tags for Sentry logging. This tagging will be enabled only when the SENTRY_URL is defined. Contribute to CURA-11482 --- src/communication/ArcusCommunication.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/communication/ArcusCommunication.cpp b/src/communication/ArcusCommunication.cpp index f59ab0e09c..263259b7b9 100644 --- a/src/communication/ArcusCommunication.cpp +++ b/src/communication/ArcusCommunication.cpp @@ -547,6 +547,9 @@ void ArcusCommunication::sliceNext() { const auto slot_id = static_cast(plugin.id()); slots::instance().connect(slot_id, plugin.plugin_name(), plugin.plugin_version(), utils::createChannel({ plugin.address(), plugin.port() })); +#ifdef SENTRY_URL + sentry_set_tag(fmt::format("engine_plugin.{}", plugin.plugin_name()).c_str(), plugin.plugin_version().c_str()); +#endif } #endif // ENABLE_PLUGINS