Skip to content

Tracking plugin sends no events with the async GrowthBookClient #146

Closed

Description

@jdorn

GrowthBookTrackingPlugin works with the legacy GrowthBook class, but with the async GrowthBookClient (v3.2.0) no events reach the ingestor.

1. Empty client key, so every batch is dropped

initialize() reads the key with getattr(gb_instance, "_client_key", "") (growthbook_tracking.py#L143). GrowthBookClient stores the key on self.options.client_key, so the plugin gets "" and _send_events returns early (#L350). Experiment views and log_event() calls are dropped without a warning. additional_callback still fires, which hides the problem.

2. Feature usage tracking receives a coroutine

_setup_feature_tracking wraps eval_feature in a sync function (#L211). On GrowthBookClient, eval_feature is async, so the wrapper passes a coroutine to _track_feature_evaluated. It logs Error tracking feature: 'coroutine' object has no attribute 'value' and sends nothing.

test_plugins_work_with_both_client_types doesn't assert that a request is sent, so neither case is caught.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions