Code Monkey home page Code Monkey logo

posthog-filter-out-plugin's Introduction

๐Ÿฆ” PostHog Filter Out Plugin

Injest only those events satisfying the given filter conditions


โš ๏ธ Moved to PostHog/posthog-filter-out-plugin

Development and support for this plugin has been moved to PostHog/posthog-filter-out-plugin. Create issues and PRs in PostHog's repository instead.


Configuration

The plugin configuration requires a JSON file with the following structure:

Example filters:

Only keep events where all the following conditions are met:

  • Email does not contain yourcompany.com
  • Host is not localhost:8000
  • Browser version greater than 100
[
  {
    "property": "email",
    "type": "string",
    "operator": "not_contains",
    "value": "yourcompany.com"
  },
  {
    "property": "host",
    "type": "string",
    "operator": "is_not",
    "value": "localhost:8000"
  },
  {
    "property": "browser_version",
    "type": "number",
    "operator": "gt",
    "value": 100
  }
]

Allowed types and their operators:

Type Operators
number gt, gte, lt, lte, eq, neq
string is, is_not, contains, not_contains, regex, not_regex
boolean is, is_not

License

MIT

posthog-filter-out-plugin's People

Contributors

pjhul avatar plibither8 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

posthog-filter-out-plugin's Issues

Support logical operators

Hello!

My company, Chroma, is a Posthog user. One of our action items from a recent incident is to better filter our Posthog events. This filter seems to be the recommended way to do so.

We'd like a way to add logical operators in filters, for example to filter if condition_1 OR condition_2 OR (condition_3 AND condition_4). I believe this is the only way for us to get the filtering behavior we want.

(Issue submitted in this repo since the forked repo doesn't seem to have an issues tab)

All events being unintentionally filtered

I've been testing out this plugin to potentially add to a tutorial I'm writing, and no matter the schema I enter, it seems to be filtering all of the events.

It is processing events and not raising any issues. An empty schema is allowing events to be injested, but no matter the what schema I tried (from very basic to multi-step), the app seems to filter all events out.

Some potential issues and fixes:

  1. I could be misconfiguring the schema. For example, using pathname to filter an autocaptured event instead of $pathname if the app doesn't handle for that.
  2. Instead of defaulting to filtering event if it doesn't pass the checks (or error), you could set it to return the event.
  3. Better logging or errors for when an event gets filtered.

Let me know if I'm missing something.

All events being filtered out

Description

Hi there, I applied the following config:

[
  {
    "property": "$ip",
    "type": "string",
    "operator": "is_not",
    "value": "<some_ip_address>"
  }
]

However all new events are dropped with this configuration. Have I done something wrong?

My goal is to drop events from a particular ip address

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.