class documentation

class PostHogBackend(TelemetryBackend):

Constructor: PostHogBackend(config)

View In Hierarchy

PostHog backend using the official python package.

Method __init__ Initialize the PostHog client.
Method capture Capture an event using the PostHog client.
Method flush Flush buffered PostHog events if supported.
Instance Variable _client Undocumented

Inherited from TelemetryBackend:

Method shutdown Shutdown backend resources and flush pending events.
Instance Variable config Undocumented
def __init__(self, config: TelemetryConfig):

Initialize the PostHog client.

Parameters
config:TelemetryConfigTelemetry backend configuration.
Raises
ValueErrorIf the PostHog API key is missing.
ImportErrorIf the posthog package is not installed.
def capture(self, event: TelemetryEvent):

Capture an event using the PostHog client.

def flush(self):

Flush buffered PostHog events if supported.

_client =

Undocumented