Git Product home page Git Product logo

rudderlabs / rudder-transformer Goto Github PK

View Code? Open in Web Editor NEW
75.0 23.0 102.0 35.4 MB

Open-source, warehouse-first Customer Data Pipeline and Segment-alternative. Collects and routes clickstream data and builds your customer data lake on your data warehouse.

Home Page: https://www.rudderstack.com

License: Other

Dockerfile 0.01% JavaScript 15.58% Shell 0.01% Makefile 0.01% TypeScript 84.41%
rudder rudder-server

rudder-transformer's Introduction

⚠️ Docker image for rudder-transformer has been moved to new org rudderstack/rudder-transformer

codecov

RudderStack Transformer

RudderStack Transformer is a service which transforms the RudderStack events to destination-specific singular events. This feature is released under under the Elastic License 2.0.

Transformer Setup

Docker

If you want to run the RudderStack Transformer inside a Docker container, follow these steps:

  1. Clone this repository
  2. Run docker-compose up transformer

Native Installation

On Mac, if you don't have make and g++, you would have to install Xcode Command Line Tools using xcode-select --install.

On Linux, install the required dependencies python, make and g++ and follow these steps:

  1. Clone this repository
  2. Setup the repository with npm run setup
  3. Build the service with npm run build:clean
  4. Start the server with npm start

Transformer without User Functions

If you don't need user functions, you can skip those and run a destination-only transformer.

Docker

If you want to run the RudderStack Transformer (without the user functions) inside a Docker container, follow these steps:

  1. Clone this repository
  2. Run docker-compose up transformer-no-func

Native Installation

On Mac, if you don't have make and g++, you would have to install Xcode Command Line Tools using xcode-select --install.

On Linux, install the required dependencies python, make and g++ and follow these steps:

  1. Clone this repository
  2. Setup the repository with npm run setup
  3. Build the service with npm run build:clean
  4. Start the server with npm start

How to run the E2E tests locally

Run make setup( make setup-arm in case of arm processor(M1 chip)). This operation is needed only once.

Now you can run make test.

If you wish you can destroy the cluster manually with make destroy.

Contact Us

If you come across any issues while setting up or running the RudderStack Transformer, feel free to start a conversation on our Slack channel.

rudder-transformer's People

Contributors

aashishmalik avatar abandonned avatar achettyiitr avatar akashrpo avatar anantjain45823 avatar arajguha avatar arnab-p avatar arnabp92 avatar dhawal1248 avatar gauravudia avatar itssudip avatar jayachand avatar koladilip avatar krishna2020 avatar lokey avatar mihir-4116 avatar psrikanth88 avatar ruchiramoitra avatar saikumarrs avatar sampath-vi avatar sandeepdsvs avatar sanpj2292 avatar sayan-mitra avatar sayan-rudder avatar shrouti1507 avatar sumanthpuram avatar ujjwal-ab avatar utsabc avatar web-flow avatar yashasvibajpai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rudder-transformer's Issues

Mixpanel where users were merged when sharing devices

When two users share one device, these two users will be merged, and it's irreversible. this is a really serious issue for us.

Suppose a scenario like this.

  1. The first time a user visits, an anonymous ID is generated: A
  2. User B logged in and the anonymous ID A and user id B were merged
  3. User C logged in with the same device, anonymous ID A and user C were merged
  4. Causes two separate users B and C to be merged on Mixpanel

Mixpanel has a mechanism to prevent issues like this if the anonymous ID is in UUID v4 format when calling identity
https://developer.mixpanel.com/reference/create-identity
image

Looks like we are calling $merge directly instead of using the $identity, probably because the user id was not in UUID v4 format at the time?
https://github.com/rudderlabs/rudder-transformer/blob/master/v0/destinations/mp/transform.js#L236-L282

Since we are generating anonymous ID in UUID v4 now, we should uncomment the code to use $identity to merge anonymous id and user id. to take advantage of the Mixpanle merge mechanism to prevent users get merged.

Clevertap & timestamps

Hey, seems like the Clevertap transformation doesn't include time information, when sending either events or profiles. It still works, but Clevertap assumes now, and that will be inaccurate when clients send older data.

Both profile and event payloads will accept a ts property, unix timestamp (seconds from epoch). https://developer.clevertap.com/docs/upload-events-api

FYI.

session_id when specified outside properties throws error

I have encountered an issue with Amplitude and hence wanted to reach out here as I might have to share some specifics
: I am using Rudder's batch API call to push events to Amplitude. The session_id https://developers.amplitude.com/docs/batch-event-upload-api is something I need outside properties so that Amplitude doesn't set it to -1.

This is what I try to send
{ "batch": [ { "type": "identify", "userId": "ubcdfghi0001", "session_id": 1598597129, "context": { "traits": { "device_id": "adddd0001", "device_os": "ios", "device_make": "apple iphone", "app_version": "v1.0", "timestamp": "2020-08-28 09:00:00" }, "library": { "name": "http" } } }, { "type": "track", "event": "clicked app", "userId": "ubcdfghi0001", "session_id": 1598597129, "context": { "library": { "name": "http" } }, "properties": { "event_id": "u001e01", "attempt_id": "u001a01", "timestamp": "2020-08-28 09:01:00" } } ] }
If I put session_id inside properties or inside traits then the message is sent successfully but session_id is always -1 in Amplitude.
But if I put them outside to overrite the value then I get the following exception on Rudder Transformer
TypeError: payload.session_id.lastIndexOf is not a function at getSessionId (/home/node/app/v0/destinations/am/transform.js:73:28) at responseBuilderSimple (/home/node/app/v0/destinations/am/transform.js:155:24) at processSingleMessage (/home/node/app/v0/destinations/am/transform.js:261:10) at toSendEvents.forEach.sendEvent (/home/node/app/v0/destinations/am/transform.js:326:19) at Array.forEach (<anonymous>) at Object.process (/home/node/app/v0/destinations/am/transform.js:325:16) at Promise.all.events.map (/home/node/app/versionedRouter.js:65:44) at Array.map (<anonymous>) at handleDest (/home/node/app/versionedRouter.js:61:12) at router.post (/home/node/app/versionedRouter.js:120:15) [] TypeError: payload.session_id.lastIndexOf is not a function at getSessionId (/home/node/app/v0/destinations/am/transform.js:73:28) at responseBuilderSimple (/home/node/app/v0/destinations/am/transform.js:155:24) at processSingleMessage (/home/node/app/v0/destinations/am/transform.js:261:10) at toSendEvents.forEach.sendEvent (/home/node/app/v0/destinations/am/transform.js:326:19) at Array.forEach (<anonymous>) at Object.process (/home/node/app/v0/destinations/am/transform.js:325:16) at Promise.all.events.map (/home/node/app/versionedRouter.js:65:44) at Array.map (<anonymous>) at handleDest (/home/node/app/versionedRouter.js:61:12) at router.post (/home/node/app/versionedRouter.js:120:15) [] TypeError: payload.session_id.lastIndexOf is not a function at getSessionId (/home/node/app/v0/destinations/am/transform.js:73:28) at responseBuilderSimple (/home/node/app/v0/destinations/am/transform.js:155:24) at processSingleMessage (/home/node/app/v0/destinations/am/transform.js:261:10) Attachment file type: document

Code: master

Amplitude integration: platform attribute is not populated

image

As shown on the image, we are sending tracking events to Amplitude using Rudder react-native SDK and the Amplitude react-native sdk.

One of the differences we see is that Rudder is not populating the platform field (we see '-'), while amplitude tracking shows the platform (iOS). This is used prominently in Amplitude: https://developers.amplitude.com/docs/http-api-v2

At this point, I am not familiar enough with the library to contribute directly, but would like to bring it up already!

Postgres Connector: Too many columns outputted from the event

Hi,

I'm struggling to get Postgres working as a destination, even for very small tracked events i get a 'Too many columns outputted from the event'.
Is there a recommended transformer? Or is there a way to store traits as JSON instead?

Many thanks,

Alex

Sending data to Hubspot's contacts endpoint

We are trying Rudderstack out at our company and one of the integration we need is with Hubspot, but we need to send data to its contacts endopoint rather than the events one. Should we use the webhook integration with a custom transformer instead?

Destinations with constant high velocity changes

Any destination in the analytics or marketing space is going to change six times by the time the community is able to publish the first.

It would be very nice if i could supply a function, and rudder yields the request object, when my block returns it goes on its merry way. Preflight decoration is fine and dandy, but what does it matter if i can only "kind-of" use my destinations in exchange for the ultimate nirvana of data normalization.

High sev. vulnerabilities found in rudder-transformer:latest

Describe the bug

Testing rudderlabs/rudder-transformer:latest...

✗ Low severity vulnerability found in openssl/libcrypto1.1
  Description: CVE-2022-0778
  Info: https://snyk.io/vuln/SNYK-ALPINE314-OPENSSL-2426333
  Introduced through: openssl/[email protected], apk-tools/[email protected], libretls/[email protected], python2/[email protected], openssl/[email protected]
  From: openssl/[email protected]
  From: apk-tools/[email protected] > openssl/[email protected]
  From: libretls/[email protected] > openssl/[email protected]
  and 6 more...
  Image layer: 'apk add --no-cache tini python2'
  Fixed in: 1.1.1n-r0

✗ High severity vulnerability found in gmp/gmp
  Description: Integer Overflow or Wraparound
  Info: https://snyk.io/vuln/SNYK-ALPINE314-GMP-2419278
  Introduced through: gmp/[email protected], isl/[email protected], gcc/[email protected], gcc/[email protected]
  From: gmp/[email protected]
  From: isl/[email protected] > gmp/[email protected]
  From: gcc/[email protected] > gmp/[email protected]
  and 3 more...
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 6.2.1-r1

------------ Detected 9 vulnerabilities for [email protected] ------------ 


✗ Low severity vulnerability found in node
  Description: Improper Input Validation
  Info: https://snyk.io/vuln/SNYK-UPSTREAM-NODE-1540539
  Introduced through: [email protected]
  From: [email protected]
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 14.17.5

✗ Low severity vulnerability found in node
  Description: Prototype Pollution
  Info: https://snyk.io/vuln/SNYK-UPSTREAM-NODE-2332186
  Introduced through: [email protected]
  From: [email protected]
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 14.18.3

✗ Medium severity vulnerability found in node
  Description: Improper Input Validation
  Info: https://snyk.io/vuln/SNYK-UPSTREAM-NODE-1540538
  Introduced through: [email protected]
  From: [email protected]
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 14.17.5

✗ Medium severity vulnerability found in node
  Description: HTTP Request Smuggling
  Info: https://snyk.io/vuln/SNYK-UPSTREAM-NODE-1731310
  Introduced through: [email protected]
  From: [email protected]
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 14.18.1

✗ Medium severity vulnerability found in node
  Description: HTTP Request Smuggling
  Info: https://snyk.io/vuln/SNYK-UPSTREAM-NODE-1731312
  Introduced through: [email protected]
  From: [email protected]
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 14.18.1

✗ Medium severity vulnerability found in node
  Description: Improper Certificate Validation
  Info: https://snyk.io/vuln/SNYK-UPSTREAM-NODE-2332185
  Introduced through: [email protected]
  From: [email protected]
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 14.18.3

✗ Medium severity vulnerability found in node
  Description: Improper Certificate Validation
  Info: https://snyk.io/vuln/SNYK-UPSTREAM-NODE-2332191
  Introduced through: [email protected]
  From: [email protected]
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 14.18.3

✗ Medium severity vulnerability found in node
  Description: Improper Handling of URL Encoding
  Info: https://snyk.io/vuln/SNYK-UPSTREAM-NODE-2332192
  Introduced through: [email protected]
  From: [email protected]
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 14.18.3

✗ High severity vulnerability found in node
  Description: Use After Free
  Info: https://snyk.io/vuln/SNYK-UPSTREAM-NODE-1540540
  Introduced through: [email protected]
  From: [email protected]
  Image layer: Introduced by your base image (node:14.17.4-alpine3.14)
  Fixed in: 14.17.5

Organization:      karl.dagenais
Package manager:   apk
Project name:      docker-image|rudderlabs/rudder-transformer
Docker image:      rudderlabs/rudder-transformer:latest
Platform:          linux/amd64
Base image:        node:14.17.4-alpine3.14
Licenses:          enabled

Tested 39 dependencies for known issues, found 11 issues.

Your base image is out of date
1) Pull the latest version of your base image by running 'docker pull node:14.17.4-alpine3.14'
2) Rebuild your local image

-------------------------------------------------------

Testing rudderlabs/rudder-transformer:latest...

Organization:      karl.dagenais
Package manager:   npm
Target file:       /home/node/app/data/package.json
Project name:      rudder-transformer
Docker image:      rudderlabs/rudder-transformer:latest
Licenses:          enabled

✔ Tested 1 dependencies for known issues, no vulnerable paths found.

-------------------------------------------------------

Testing rudderlabs/rudder-transformer:latest...

Tested 130 dependencies for known issues, found 8 issues.


Issues to fix by upgrading:

  Upgrade [email protected] to [email protected] to fix
  ✗ Regular Expression Denial of Service (ReDoS) [High Severity][https://snyk.io/vuln/SNYK-JS-AXIOS-1579269] in [email protected]
    introduced by [email protected]

  Upgrade [email protected] to [email protected] to fix
  ✗ Privilege Escalation [High Severity][https://snyk.io/vuln/SNYK-JS-ISOLATEDVM-1243750] in [email protected]
    introduced by [email protected]

  Upgrade [email protected] to [email protected] to fix
  ✗ Information Exposure [Medium Severity][https://snyk.io/vuln/SNYK-JS-NODEFETCH-2342118] in [email protected]
    introduced by [email protected]

  Upgrade [email protected] to [email protected] to fix
  ✗ Prototype Pollution [High Severity][https://snyk.io/vuln/SNYK-JS-UNSETVALUE-2400660] in [email protected]
    introduced by [email protected]


Issues with no direct upgrade or patch:
  ✗ Regular Expression Denial of Service (ReDoS) [Medium Severity][https://snyk.io/vuln/SNYK-JS-UGLIFYJS-1727251] in [email protected]
    introduced by [email protected] > [email protected]
  This issue was fixed in versions: 3.14.3
  ✗ Open Redirect [Medium Severity][https://snyk.io/vuln/SNYK-JS-URIJS-2401466] in [email protected]
    introduced by [email protected] > [email protected]
  This issue was fixed in versions: 1.19.8
  ✗ Improper Input Validation [Medium Severity][https://snyk.io/vuln/SNYK-JS-URIJS-2415026] in [email protected]
    introduced by [email protected] > [email protected]
  This issue was fixed in versions: 1.19.9
  ✗ Open Redirect [Medium Severity][https://snyk.io/vuln/SNYK-JS-URIJS-2419067] in [email protected]
    introduced by [email protected] > [email protected]
  This issue was fixed in versions: 1.19.10

Steps to reproduce the bug
docker scan rudderlabs/rudder-transformer:latest

Expected behavior
no high or critical sev vulns in results

Screenshots
n/a

`Cannot read property 'type' of undefined` with user transforms

I have updated to the latest version of the Transformer Docker image, and this error starts showing up if I use user transforms for the Customerio destination.

As a consequence, events are not forwarded to the destination.

Even the simplest transform function (function transform(events) { return events; }) causes the error to occur.

It goes away if I disable user transforms for that destination.

Rolling back to a previous version fixes the issue.

Below a the complete stack trace as it shows up in the transformer's logs.

TypeError: Cannot read property 'type' of undefined
2020-09-08T11:27:23.721744650Z     at processSingleMessage (/home/node/app/v0/destinations/customerio/transform.js:194:31)
2020-09-08T11:27:23.721749954Z     at Object.process (/home/node/app/v0/destinations/customerio/transform.js:224:18)
2020-09-08T11:27:23.721753255Z     at Promise.all.events.map (/home/node/app/versionedRouter.js:65:44)
2020-09-08T11:27:23.721756337Z     at Array.map (<anonymous>)
2020-09-08T11:27:23.721760181Z     at handleDest (/home/node/app/versionedRouter.js:61:12)
2020-09-08T11:27:23.721763115Z     at router.post (/home/node/app/versionedRouter.js:120:15)
2020-09-08T11:27:23.721778815Z     at dispatch (/home/node/app/node_modules/koa-router/node_modules/koa-compose/index.js:44:32)
2020-09-08T11:27:23.721783777Z     at next (/home/node/app/node_modules/koa-router/node_modules/koa-compose/index.js:45:18)
2020-09-08T11:27:23.721786540Z     at /home/node/app/node_modules/koa-router/lib/router.js:346:16
2020-09-08T11:27:23.721805807Z     at dispatch (/home/node/app/node_modules/koa-router/node_modules/koa-compose/index.js:44:32) []```

Issue in Installation

Hi, I am setting up rudder-transformer. I am following the steps described on this link. On running npm i I encountered the following error:

anuj rudder-server/rudder-transformer remotes/origin/webhook_restapis~1> npm i                   
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm WARN deprecated [email protected]: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: "Please update to latest v2.3 or v2.2"
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated [email protected]: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /Users/anuj/workspace/rudder-server/rudder-transformer/node_modules/isolated-vm
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild --release -j 4
npm ERR! CXX(target) Release/obj.target/nortti/src/external_copy/serializer_nortti.o
npm ERR!   CXX(target) Release/obj.target/nortti/src/isolate/allocator_nortti.o
npm ERR!   LIBTOOL-STATIC Release/nortti.a
npm ERR!   CXX(target) Release/obj.target/isolated_vm/src/external_copy/external_copy.o
npm ERR!   CXX(target) Release/obj.target/isolated_vm/src/external_copy/serializer.o
npm ERR!   CXX(target) Release/obj.target/isolated_vm/src/external_copy/string.o
npm ERR!   CXX(target) Release/obj.target/isolated_vm/src/isolate/environment.o
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info find Python using Python version 3.9.5 found at "/Users/anuj/.pyenv/versions/3.9.5/bin/python3"
npm ERR! (node:72954) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /Users/anuj/.pyenv/versions/3.9.5/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/Users/anuj/workspace/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/anuj/workspace/rudder-server/rudder-transformer/node_modules/isolated-vm/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/anuj/workspace/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/anuj/Library/Caches/node-gyp/16.4.2/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/anuj/Library/Caches/node-gyp/16.4.2',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/Users/anuj/workspace/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/anuj/Library/Caches/node-gyp/16.4.2/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/anuj/workspace/rudder-server/rudder-transformer/node_modules/isolated-vm',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build', '--jobs', 4 ]
npm ERR! ../src/isolate/environment.cc:343:11: error: call to member function 'SetHostImportModuleDynamicallyCallback' is ambiguous
npm ERR!         isolate->SetHostImportModuleDynamicallyCallback(nullptr);
npm ERR!         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /Users/anuj/Library/Caches/node-gyp/16.4.2/include/node/v8.h:8889:8: note: candidate function
npm ERR!   void SetHostImportModuleDynamicallyCallback(
npm ERR!        ^
npm ERR! /Users/anuj/Library/Caches/node-gyp/16.4.2/include/node/v8.h:8896:8: note: candidate function
npm ERR!   void SetHostImportModuleDynamicallyCallback(
npm ERR!        ^
npm ERR! ../src/isolate/environment.cc:448:11: error: no member named 'RunMicrotasks' in 'v8::Isolate'
npm ERR!         isolate->RunMicrotasks();
npm ERR!         ~~~~~~~  ^
npm ERR! 2 errors generated.
npm ERR! make: *** [Release/obj.target/isolated_vm/src/isolate/environment.o] Error 1
npm ERR! make: *** Waiting for unfinished jobs....
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/Users/anuj/workspace/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Darwin 20.5.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/16.4.2/bin/node" "/Users/anuj/workspace/node_modules/.bin/node-gyp" "rebuild" "--release" "-j" "4"
npm ERR! gyp ERR! cwd /Users/anuj/workspace/rudder-server/rudder-transformer/node_modules/isolated-vm
npm ERR! gyp ERR! node -v v16.4.2
npm ERR! gyp ERR! node-gyp -v v8.1.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/anuj/.npm/_logs/2021-08-12T11_44_17_816Z-debug.log
Node version: 16.4.2
System: MacOS Big Sur with Apple M1 Chip

Ruby <> PostHog url confusion

We've had a user who users the ruby rudderstack library to send data to PostHog. They were sending data according to your docs, but PostHog requires the url to be $current_url, not url.

Amplitude revenue tracking: revenueType missing in documentation (and probably need for snake case in transformer)

Amplitude documentation: https://help.amplitude.com/hc/en-us/articles/115003116888-Tracking-Revenue#h_7a841611-ad4f-459a-98ce-073a4a1fe8e5 includes revenueType

It is not here (https://docs.rudderstack.com/rudderstack-api-spec/rudderstack-ecommerce-events-specification/ordering or on the amplitude destination documentation

The transformer also has a camelCase version where it probably should be snake case (on the Rudder end):

"properties.revenueType": "revenueType",

#197

Elasticsearch connector

Adding an elasticsearch connector could be a very interesting option.

Would open a whole universe of possibilities.

  • Kibana Dashboards
  • Real-time searching
    and many more.

GetVero Support

Hi,
we're planning on moving from segment to rudderstack, but you don't seem to support the Vero integration yet..so it's blocking us from moving :'(

Ideally, i'd love to get the same level of integration that the one you propose on customerio:

  • push identify calls
  • push track calls

here's the vero documentation: https://developers.getvero.com/

thanks !

AMP Analytics sends numbers as string

Hello

I'm using amp-analytics to send events to facebook.
What i've noticed is it's getting sent via query params in a url, something like this

https://track.website.com/pixel/v1/track?writeKey=######&properties.quantity=20&properties.price=482

And what happens is the server reads the query params as strings and pass it on to the function on the line referenced below as string which then returns the error of

TypeError: (revenue || 0).toFixed is not a function

return Number((revenue || 0).toFixed(2));

Sending data to Hubspot's forms endpoint

We are trying Rudderstack out at our company and one of the integration we need is with Hubspot, but we need to send data to its form endpoint. Should we use the webhook integration with a custom transformer instead?

Update Posthog property mappings

Hi guys.

Some of the current property mapping for posthog destination are not up-to-date. Please have a thorough look and update them.

Posthog staff redirected me to this source for the actual mappings:

Example of useless mappings:
url -> $host (we get posthog $host without this mapping)

Example of obsolete properties (posthog does not use them anymore):
context.screen.density -> $screen_density
context.device.manufacturer -> $device_manufacturer
context.os.version -> $os_version
context.timezone -> $timezone
context.locale -> $locale
context.userAgent -> $user_agent
context.app.version -> $app_version
context.network.carrier -> $network_carrier
context.app.name -> $app_name
context.device.model -> $device_model
context.app.namespace -> $app_namespace
context.app.build -> $app_build

Example of a changed property:
context.device.name -> $device_name (this is probably now just $device)

Usefull parameters to be added:
All UTM prameters: https://github.com/PostHog/posthog/blob/0c65195a9d1f23690a64457130f4ca1709ded4fc/frontend/src/lib/components/PropertyKeyInfo.tsx#L327

viewport resolutions: https://github.com/PostHog/posthog/blob/0c65195a9d1f23690a64457130f4ca1709ded4fc/frontend/src/lib/components/PropertyKeyInfo.tsx#L71

Properties that could be more usefull if changed (idea):
context.userAgent -> $user_agent (if changed to $useragent the posthog parser plugin would work)
https://github.com/weyert/useragentplugin

How to pass IDFV to Amplitude?

The Amplitude HTTP API v2 has a property "IDFV" (https://developers.amplitude.com/docs/http-api-v2#properties-1) that can be used to integrate with other 3rd parties (e.g AppsFlyer). Looking at a sample payload, Rudderstack currently does not fill this property when calling Amplitude's API.

IDFV, AFAIK, is just the device_id on iOS devices. Rudderstack is already passing the device_id to Amplitude. It just hasn't been filling the IDFV field.

One way to fix this is have Rudderstack copy the device_id field over to the IDFV field for iOS events.

Can we do that?

Events are not populating on branch dashboard

We are trying to send events into branch.io destination, seems no events are populating on the branch dashboard , and no errors are seen in rudder-stack dashboard (LiveEvents)

SourceEvent:

{
"_metadata": {
"nodeVersion": "10.22.0"
},
"channel": "server",
"context": {
"library": {
"name": "analytics-node",
"version": "1.1.3"
}
},
"event": "be_payment_successful",
"messageId": "node-68845e8a0d2036a0007100ff6cbb4523-762a6f69-5199-4202-b77d-53c28054fcd3",
"originalTimestamp": "2022-06-02T09:16:19.572Z",
"properties": {
"coupon_discount": 0,
"due_amount": 2257,
"email": "@gmail.com",
"first_name": "
",
"last_name": "
",
"late_fees_applied": 2257,
"name": "
* Baruah",
"payment_mode": "juspay_PHONEPE",
"phone": "**",
"rentomoney_deducted": 2257,
"user_id": 123
},
"rudderId": "33fe75f2-087c-4cc6-9922-d24ba0b05b0b",
"sentAt": "2022-06-02T09:16:39.572Z",
"type": "track",
"userId": "941244"
}

LiveEvent payload on destination:

{
"body": {
"XML": {},
"FORM": {},
"JSON": {
"name": "product_viewed",
"user_data": {
"os": "",
"os_version": "",
"screen_dpi": 3,
"user_agent": "Mozilla/5.0 (Linux; Android 12; SM-G781B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36",
"app_version": "2.5.2",
"screen_width": 360,
"screen_height": 800,
"developer_identity": "9dda6e9f-9db3-46bf-be3f-b4ade855d54f"
},
"branch_key": "key_test_***",
"custom_data": {
"sku": "XFSU3G",
"city": "Bangalore",
"rent": 707,
"total": 0,
"device": "mobile",
"tenure": 12,
"deposit": 949,
"partner": "n/a",
"currency": "INR",
"page_url": "https://www.rentomojo.com/bangalore/furniture/rent-heathcliff-3-seater-couch/5108",
"platform": "rentomojo-android",
"logged_in": false,
"page_name": "Product",
"page_type": "product page",
"ab_variant": "n/a",
"product_id": 4813,
"session_id": "session-1654016705116-88b719a6-0d96-4c83-95db-d1dc6a0c9faf",
"is_preorder": false,
"product_vid": 5108,
"out_of_stock": true,
"product_name": "Casper 3-Seater Fabric Sofa (Grey)",
"sub_category": "Sofas",
"category_name": "Furniture",
"category_page_url": "https://www.rentomojo.com/bangalore/furniture-on-rent",
"category_image_url": "https://www.rentomojo.com/public/images/categories/furniture-small_update.png",
"mood_shot_image_url": "https://p.rmjo.in/moodShot/v7b6v8nn-1024x512.jpg",
"marketing_product_name": "Casper 3-Seater Sofa"
},
"content_items": [
{}
]
},
"JSON_ARRAY": {}
},
"type": "REST",
"files": {},
"method": "POST",
"params": {},
"userId": "9dda6e9f-9db3-46bf-be3f-b4ade855d54f",
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
},
"version": "1",
"endpoint": "https://api2.branch.io/v2/event/custom"
}

GA Campaign ID missing

Hey guys.

There are a few important google analytics properties missing especially:

sr - https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#sr
vp - https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#vp
ci - https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ci
gclid - https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#gclid
dclid - https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#dclid

We already collect resolution info, but the transformer is not forwarding this info to the destination.
Campaign ID and Google Ads ID are also very important when working with ad platforms.

Can please somebody include this in the transformer for GA?

Amplitude doesn't work with integer user ids

Hi Guys! ;)

Congraturations! RudderStack it's becoming "my new passion" ;) You're doing a great job 👏🏻

I'm sharing with you a small issue I detected when using integer user_id and trying to send events to Amplitude.

It causes an error 400: "events_with_invalid_user_id_length"

It's because Amplitude's default minimum user_id length is 5. Using integer values, all users ids between 1 and 9999 will cause the error.

By attaching min_id_length property to the Amplitude's call, you can set the minimum length to 1 and allow all integer values.

This option must be passed outside the events collections in the JSON structure. It's at the user_id level.

You can see more info here: help.amplitude.com/hc/en-us/articles/360032842391-HTTP-API-V2#device-ids-and-user-ids-minimum-length

Here you are a tested and working call:

{
    "api_key": "{{api_key}}",
    "options": {
    	"min_id_length": 1
    },
    "events": [
        {
            "user_id": "123",
            "event_type": "completeRegistration",
            "time": 1583909415,
            "event_properties": {
            	........
            },
            "user_properties": {
            	
            }
        }
    ]
}

I hope you find this useful...

Thanks!

TikTok Not getting IP

In order to get TikTok to work, I had to do
event.context.ip = event.request_ip
in a transformer.

I'm a little confused since the Rudderstack docs imply that context.ip should be populated automatically.

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.