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

[BUG] NullReferenceException in PayloadSenderV2 if APM is disabled #2433

Closed
th3ragex opened this issue Sep 4, 2024 · 2 comments · Fixed by #2436
Closed

[BUG] NullReferenceException in PayloadSenderV2 if APM is disabled #2433

th3ragex opened this issue Sep 4, 2024 · 2 comments · Fixed by #2436
Labels
bug Something isn't working community triage

Comments

@th3ragex
Copy link

th3ragex commented Sep 4, 2024

APM Agent version

1.28.5

Describe the bug

While debugging NullReferenceExceptions were observed in PayloadSenderV2.
The APM was disabled via: "ELASTIC_APM_ENABLED": "false",

_logger.Debug()
?.Log("Queue reached max capacity - " + dbgEventKind + " will be discarded."

_logger was null, NRE was raised within Debug method.

Observed root causes:

  1. Call of extension methods on null object
  2. Execution of internal logic even though the object was not fully initialized
    {
    if (!isEnabled)
    return;

Expected behavior

  1. Do not call Extension methods on null
  2. Do not call EnqueueEventInternal if APM is disabled
@th3ragex th3ragex added the bug Something isn't working label Sep 4, 2024
@Mpdreamz Mpdreamz linked a pull request Sep 9, 2024 that will close this issue
@Mpdreamz
Copy link
Member

Thanks for reporting this rather nasty bug @th3ragex 🙏 , we will be pushing a new release with a fix shortly.

@th3ragex
Copy link
Author

@Mpdreamz Thank you for your fast and continuous support on this library! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants