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: add SDK and Crawlee version to the ApifyClient's user agent #335

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

B4nan
Copy link
Member

@B4nan B4nan commented Nov 1, 2024

The support for this was added in client v2.10 (https://github.com/apify/apify-client-js/pull/602/files#diff-c33bae26ce4a7b3559aef1321052b4e22c099a786ae6d660d9409bee032c7fa8R44), user agent looks like this:

ApifyClient/2.9.8 (Darwin; Node/v22.11.0); isAtHome/false; SDK/3.1.1; Crawlee/3.11.5

Closes #331

@github-actions github-actions bot added this to the 101st sprint - Tooling team milestone Nov 1, 2024
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 1, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Pull Request Tookit has failed!

None of the pull request and linked issue has estimate

@B4nan
Copy link
Member Author

B4nan commented Nov 1, 2024

@mnmkng This adds both SDK and Crawlee versions to the UA, since SDK uses code from crawlee, it's technically always there (and we validate that the version it uses is the same), do you think we should differentiate calls just from SDK and those from crawlee? I wouldn't care about that personally, especially since users can use the static Actor... methods in crawlee projects too, so what would be trying to differentiate in the first place? The only place crawlee uses the client internally is to communicate with the storages, that is handled via the Actor.init call, and that comes from the user (and will be there even without crawlee being in use explicitly), so I am not sure if/how could this be done.

@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Nov 1, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Pull Request Tookit has failed!

None of the pull request and linked issue has estimate

@B4nan
Copy link
Member Author

B4nan commented Nov 5, 2024

I'll merge this in, we can always improve later.

@B4nan B4nan merged commit 9c069a1 into master Nov 5, 2024
9 checks passed
@B4nan B4nan deleted the custom-client-ua branch November 5, 2024 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add SDK version to Client user agent
1 participant