New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

artillery-engine-posthog

Package Overview
Dependencies
Maintainers
1
Versions
332
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

artillery-engine-posthog

Load test PostHog with Artillery

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
77
decreased by-29.36%
Maintainers
1
Weekly downloads
 
Created
Source

Artillery Engine for PostHog

PostHog logo

PostHog is an open-source product analytics platform.

This Artillery engine is designed for users of self-hosted PostHog (Open-Source or PostHog Enterprise). It makes it easy to load test your PostHog deployment to:

  • Make sure the deployment can handle the event volume you're expecting
  • Make sure the deployment can handle bursts in event volumes
  • Take guesswork out of provisioning capacity and make sure that both PostHog and its dependencies (e.g. ClickHouse) are ready to scale

Usage

Install the plugin

npm install -g artillery-engine-posthog

Configuration

  1. Set the address of your PostHog instance with config.target, and set a PostHog API key with config.posthog.apiKey.
  2. Set the engine property of the scenario to posthog.
  3. In your scenario, use:
    • capture to send events to PostHog
    • identify and alias to enrich users metadata
Example Script
config:
  target: "https://posthog.acme.corp"
  posthog:
    apiKey: "{{ $processEnvironment.POSTHOG_API_KEY }}"
  phases:
    - arrivalCount: 5
      duration: 10
  engines:
    posthog: {}
scenarios:
  - name: "posthog engine test"
    engine: posthog
    flow:
      - count: 3
        loop:
        - capture:
            distinctId: "distinct id"
            event: "movie played"
            properties:
              movieId: "Die Hard"
              category: "Christmas"
        - think: 2

(See examples folder for a couple of full examples.)

Run Your Script

POSTHOG_API_KEY=xxx artillery run example.yml

License

MPL 2.0

Keywords

FAQs

Package last updated on 30 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc