Upgrading to v1.0.0
- Snowplow Micro now uses the exact same validation with a production Snowplow pipeline, which is even stricter and so ensures that if Micro validates an event, then it cannot fail during the enrichment in production.
- Micro now outputs the post-enrichment, canonical event (just with enrichments deactivated).
If you have been using the previous version (v0.1.0) in your test suites, you can easily upgrade to the new version (recommended). The steps include:
- Point to the new version
1.0.0
of Micro in yourdocker run
command or in yourdocker-compose.yml
file. - Modify the configuration for Micro, an example of which can be found in the
micro.conf
file here. - The response format for
GoodEvents
has changed, since Micro now outputs the post-enrichment event. This means that if in your tests you were filtering onGoodEvents
through the/micro/good
endpoint, you will need to change:- the expected values for
eventType
. For example:
pv
page_view
pp
page_ping
se
struct
ue
unstruct
Note: If you use the helper module of this repo and upgrade to its latest release, then the above should be the only change you will need in your tests’ spec files.- the event specific fields, that were transformed for enrichment. Some of them are in the table below, but you can see all of the transformations here.
e
event
aid
app_id
p
platform
uid
user_id
dtm
dvce_created_tstamp
tna
name_tracker
page
page_title
se_ca
se_category
se_ac
se_action
se_la
se_label
se_pr
se_property
se_va
se_value
ue_pr
unstruct_event
co
contexts
ue_px
unstruct_event
cx
contexts
Note: Theunstruct_event
andcontexts
fields have already parsed theue_pr
andco
and have already decoded and parsed theue_px
andcx
raw event fields respectively.- the structure you expect. The event that was the output of Micro’s v0.1.0, now corresponds to the
rawEvent
field of the event output of v1.0.0.
GoodEvent
follows, showing the structure and highlight the differences described above:{ "rawEvent": { ... "parameters": { "e": "ue", "eid": "966d4d79-11d9-4fa6-a1a5-6a0bc2d06de1", "aid": "DemoID", ..., "ue_pr": "{\"schema\":\"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0\",\"data\":{\"schema\":\"iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0\",\"data\":{\"formId\":\"FORM\",\"elementId\":\"user_email\",\"nodeName\":\"INPUT\",\"elementClasses\":[\"form-control\"],\"value\":\"fake@foo.com\",\"elementType\":\"email\"}}}", ... }, ... }, "eventType": "unstruct", "schema": "iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0", "contexts": [ "iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0", ... ], "event": { "event": "unstruct", "event_id": "966d4d79-11d9-4fa6-a1a5-6a0bc2d06de1", "app_id": "DemoID", ..., "unstruct_event": { "schema": "iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0", "data": { "schema": "iglu:com.snowplowanalytics.snowplow/focus_form/jsonschema/1-0-0", "data": { "formId": "FORM", "elementId": "user_email", "nodeName": "INPUT", "elementClasses": [ "form-control" ], "value": "fake@foo.com", "elementType": "email" } } }, ... } }
- the expected values for