question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Explore user-defined enrichments

See original GitHub issue

First attempt: https://github.com/snowplow/snowplow/commit/61ad6f9bfaea7299b21d579289782e54f59c141d#commitcomment-13187113

The current idea is to have users create a class extending IUserEnrichment defining a method which takes an EnrichedEvent and returns Unit, i.e. it mutates the EnrichedEvent in place.

They would specify in the configuration where those classes can be found, what the name of the class is, and whether each class is enabled:

[
  {
    "class": "com.acme.CustomEnrichment",
    "url": "s3://path/to/customenrichment.jar",
    "enabled": true
  }
]

Each enabled class would then be loaded and instantiated at runtime.

Possible extension to this: the method could be given as additional argument json4s objects containing all contexts and unstructured event JSONs, so that users don’t have to deserialize the EnrichedEvent JSON strings.

Additionally, the method could optionally derived contexts json4s objects.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:19 (19 by maintainers)

github_iconTop GitHub Comments

3reactions
alexanderdeancommented, Oct 22, 2018

I think in a Docker world the idea of having the adapter or enricher connected over the network at runtime is much nicer than modifying the build artifact.

0reactions
chuwycommented, Jun 20, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom Data Enrichment - Coralogix
Custom Log Enrichment with Coralogix enables you to easily enrich your log data. Now, you can automatically add fields to your JSON logs ......
Read more >
Enrich events with additional data - Moogsoft Docs
Event workflows provide enrichment for events. An event workflow is a user-defined, fully-automated sequence of actions applied to each new ...
Read more >
Enrichment Patterns With Apache Beam | by Tony Moulton
DoFn — A user defined function invoked for each input element and ... It's surprising scalable and something to explore in a future...
Read more >
Data Enrichment | Couchbase Docs
When any document within the collection is created or modified, the Eventing Function executes a user-defined routine. In this example, if the created...
Read more >
EnrichIntersect: an R package for custom set enrichment ...
However, most enrichment tools use already-existing gene sets or biochemical pathway databases, for example, Gene Ontology (GO) and Kyoto ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found