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

feat(php): reimagine fire and forget and development mode #1181

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

AndriiAndreiev
Copy link
Collaborator

@AndriiAndreiev AndriiAndreiev commented Feb 28, 2025

🧰 Changes

  • added "fire_and_forget" option in the PHP package that stands for switching from async to sync sending requests.
  • "development_mode" option was reimagined and aligned with Node. It stands only for marking logs as "development".

In order to make our config options consistent throughout all languages and frameworks there are some changes need to be done.

In Node.js Package config we have 2 options:

  • development: Defaults to false. When true, the log will be marked as a development log. This is great for separating staging or test data from data coming from customers.
  • fireAndForget: Defaults to true. When false, the server will wait for the response from the metrics call. This will be slower, but the response is useful in debugging problems.

In PHP we have only one option that stands for both 2 Node options:

  • development_mode: When disabled, development_mode will make all API requests asynchronously as well as silencing all possible errors in transit. This defaults to true, and you should change it to false before deploying your integration to production.

With this PR, PHP will have upgraded options, having the same logic as we have in Node.

🧬 QA & Testing

Fixed unit & integration tests

@AndriiAndreiev AndriiAndreiev marked this pull request as draft February 28, 2025 13:50
@AndriiAndreiev AndriiAndreiev marked this pull request as ready for review February 28, 2025 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant