Skip to content

Conversation

@crleona
Copy link
Contributor

@crleona crleona commented Jul 1, 2025

Summary

Adds support for user_agent property

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

@crleona crleona requested a review from Copilot July 1, 2025 02:11
Copy link

Copilot AI 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 Overview

Adds support for a new user_agent field on Event objects, enabling clients to set a custom user-agent string when sending events.

  • Extend EventOptions property mapping to include user_agent
  • Add user_agent parameter to EventOptions and all BaseEvent subclasses
  • Update docstrings to describe the new parameter
Comments suppressed due to low confidence (2)

src/amplitude/event.py:167

  • No unit tests were added to verify that the user_agent property is correctly included in the event payload. Consider adding tests for this behavior.
    "user_agent": ["user_agent", str]

src/amplitude/event.py:213

  • Public documentation (e.g., README, reference guide) should be updated to document the new user_agent parameter and its usage examples.
        user_agent (str, optional): The user agent string.

@crleona crleona requested review from igor-amp and sojingle July 1, 2025 02:19
Copy link
Contributor

@sojingle sojingle left a comment

Choose a reason for hiding this comment

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

LGTM!

@crleona crleona merged commit bda8b95 into main Jul 1, 2025
9 of 10 checks passed
@crleona crleona deleted the add_user_agent branch July 1, 2025 15:44
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.

3 participants