Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record useful logs as Breadcrumbs to understand and reproduce the situation. #72

Open
o0h opened this issue Jun 29, 2021 · 2 comments
Open
Labels
4.x enhancement New feature or request

Comments

@o0h
Copy link
Contributor

o0h commented Jun 29, 2021

Sentry provides a feature called Breadcrumbs.
According to the mention on the official site, this feature is intended for server-side use in the following ways

Sentry server-side SDKs, including Python and PHP, provide breadcrumbs for logging messages, network requests, database queries, and more.
https://sentry.io/features/breadcrumbs/

If this plugin can also retain "what was happening" with these features, the development and maintenance of CakePHP applications will be even more pleasant.

In sentry-laravel, The following PR is the initial version implemented.
https://github.com/getsentry/sentry-laravel/pull/31/files

Would it be possible to perform a similar process? I think it's worth looking into.

@o0h o0h added enhancement New feature or request 4.x labels Jun 29, 2021
@o0h
Copy link
Contributor Author

o0h commented Jun 29, 2021

Instead of "logging events", If the plugin provides a "log engine that handles Sentry breadcrumbs" that corresponds to CakePHP's original logging mechanism, we can handle in an intuitive way INFO logs and QUERY logs which we need?

@o0h
Copy link
Contributor Author

o0h commented Jun 29, 2021

Sentry's Breadcrumb can have some fields as below.

  • $this->type = $type;
  • $this->level = $level;
  • $this->category = $category;
  • $this->message = $message;
  • $this->metadata = $metadata;
  • $this->timestamp = microtime(true);

If I implement this as a log engine rather than a method of subscribing to events, can I extract the information corresponding to the following fields?
Some of these may include name, subject, etc. if it is an Event, there may be room to utilize them.

  • type
  • category

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant