-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7501991
commit a4580b3
Showing
8 changed files
with
7,175 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"php":"8.0.30","version":"3.39.1:v3.39.1#857046d26b0d92dc13c4be769309026b100b517e","indent":" ","lineEnding":"\n","rules":{"binary_operator_spaces":{"default":"at_least_single_space"},"blank_line_after_opening_tag":true,"blank_line_between_import_groups":true,"blank_lines_before_namespace":true,"braces_position":{"allow_single_line_empty_anonymous_classes":true},"class_definition":{"inline_constructor_arguments":false,"space_before_parenthesis":true},"compact_nullable_type_declaration":true,"declare_equal_normalize":true,"lowercase_cast":true,"lowercase_static_reference":true,"new_with_parentheses":true,"no_blank_lines_after_class_opening":true,"no_leading_import_slash":true,"no_whitespace_in_blank_line":true,"ordered_class_elements":{"order":["use_trait"]},"ordered_imports":{"imports_order":["class","function","const"],"sort_algorithm":"none"},"return_type_declaration":true,"short_scalar_cast":true,"single_import_per_statement":{"group_to_single_imports":false},"single_trait_insert_per_statement":true,"ternary_operator_spaces":true,"unary_operator_spaces":true,"visibility_required":true,"blank_line_after_namespace":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"attribute_placement":"ignore","on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"encoding":true,"full_opening_tag":true},"hashes":{"gateways\/Bluem_Creditcard_Payment_Gateway.php":"f5bea7a321540f7368ab56245a6a2c16","gateways\/Bluem_Sofort_Payment_Gateway.php":"2bc2ded0b685fbabb01dbe16433f9035","gateways\/Bluem_CarteBancaire_Payment_Gateway.php":"6f86e64622c88ecb283e4e5b193b79d9","gateways\/Bluem_PayPal_Payment_Gateway.php":"9484dd7ba1bcbff3ee2a3fbef7352240","gateways\/Bluem_Bank_Based_Payment_Gateway.php":"85e436f95be9c9d86afbbc5562875e6a","gateways\/Bluem_Mandates_Payment_Gateway.php":"9c5469ea5668180b9d1a47fcbcdfc2b6","gateways\/Bluem_iDEAL_Payment_Gateway.php":"c7a3969c5e386651afeef4ceda50d6df","gateways\/Bluem_Payment_Gateway_Interface.php":"139437cdf558c183074aa606755387a3","gateways\/Bluem_Payment_Gateway.php":"71d21fc3c3ee54e59503046c27d09c60","bluem-mandates.php":"be04a3bcee93db7fd9cc57731f9fbc84","bluem-interface.php":"c72f2cb7919bf3ed05ff296f017aff3a","index.php":"133002ba6da2763767d77c39bd56ba8d","bluem-mandates-shortcode.php":"7be2c75c1d0762b8fdf5e136c7f7f078","tests\/Unit\/BluemTest.php":"c94dd5707bc4070d2f6ed9d4bf942046","tests\/Acceptance\/FirstCest.php":"01b3400790dc6ddb3a1f4609562aa95c","tests\/Support\/AcceptanceTester.php":"a58ff42eb4a35ec58fdb503ee497a95c","tests\/Support\/_generated\/AcceptanceTesterActions.php":"b5462b02ae9aa7772ef7ff176086951c","tests\/Support\/_generated\/FunctionalTesterActions.php":"2a17766d1b2e1a78795a74181c491043","tests\/Support\/_generated\/UnitTesterActions.php":"9478041665ef070a3db44f568ecf8b91","bluem-idin.php":"3b3d4b44fbac12affb8843f9addc59a0","uninstall.php":"132045b2222673df39f723ecee1af875","bluem.php":"e568b22356c93de4f46e99b96f824491","bluem-payments.php":"9deb29956167084c284b1b837c2957ef","bluem-compatibility.php":"9ae1ffc2349b1e203aca65950bb9512b","bluem-db.php":"29128f815231c5be89f3acc1cdef4735","bluem-integrations.php":"7fe31272f523f8cba23eaf20062a7d8d","bluem-login.php":"247e4f6a19b5a2d7d0f3ca56bdb66537","views\/requests.php":"0051e9d1f9b7f1efefa858b8cc165452","views\/settings.php":"c9b85100395f7e0e1079f5d3d663ff34","views\/home.php":"9309636555f22bd5f94129cdf6966a7b","views\/importexport.php":"1e52c1760d09e89e53a62a2da628fb8e","views\/request.php":"3c751900ece726e6c45dd8f38bdf843e","views\/status.php":"30553c25ea34b233c2c3a47f0fb64dd8","views\/activate.php":"f22114a10dd3e17ab849190cdcf3e31a","bluem-mandates-instant.php":"9f194374bcba0562e776f2d629404438"}} |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace Bluem\Wordpress\Observability; | ||
|
||
use Sentry\State\Scope; | ||
use function Sentry\configureScope; | ||
|
||
final class SentryLogger | ||
{ | ||
private const KEY = 'ce6a8fc06ff29a03f805eae2041fdd4e@o4506286009548800'; | ||
private const PROJECT_ID = 4506286012891136; | ||
|
||
private const ENV_DEVELOPMENT = 'development'; | ||
private const ENV_PRODUCTION = 'production'; | ||
|
||
public function initialize(): void | ||
{ | ||
\Sentry\init([ | ||
'dsn' => 'https://'.self::KEY.'.ingest.sentry.io/'.self::PROJECT_ID, | ||
'environment' => $this->getEnvironment(), | ||
'attach_stacktrace'=> true, | ||
]); | ||
|
||
$values = get_option( 'bluem_woocommerce_options' ); | ||
$senderId =$values['senderID'] ?? ''; | ||
|
||
configureScope(function (Scope $scope) use ($senderId): void { | ||
$scope->setContext('website', [ | ||
'name' => get_bloginfo( 'name' ), | ||
'email' => get_option( "admin_email" ), | ||
'url'=> home_url(), | ||
]); | ||
$scope->setTag('bluemSenderId', $senderId); | ||
}); | ||
} | ||
|
||
private function getEnvironment(): string | ||
{ | ||
if($_SERVER['SERVER_NAME'] === 'localhost') { | ||
return self::ENV_DEVELOPMENT; | ||
} | ||
|
||
return self::ENV_PRODUCTION; | ||
} | ||
} |
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
Oops, something went wrong.