Skip to content

Cookie Extractor misses cookies behind JSON stringified cookie values #904

@rowolff

Description

@rowolff

Project:
Stream Enrich

Version:
5.0.0

Expected behavior:

  • Given the cookies AS_JSON={\"Key\":"Value"}; wanted_cookie=crucial_value;
  • When wanted_cookie is configured in the cookie extractor enrichment
  • Then the wanted cookie is available in derived_contexts

Actual behavior:

The extraction only works if there's no stringified JSON in front of the wanted cookie:

  • works: Cookie: wanted_cookie=crucial_value; AS_JSON={\"Key\":"Value"};
  • breaks: Cookie: AS_JSON={\"Key\":"Value"}; wanted_cookie=crucial_value;

Steps to reproduce:

  1. Configure cookie extractor with at least one cookie name
  2. Create a request where the wanted cookie is behind a stringified JSON cookie value (example above)

Example:
I reproduced this with Snowplow Micro in this repository: https://github.com/rowolff/snowplow-micro-debugging/

Additional info:

  • This behaviour is observed with Stream Collector 3.2.0/Enrich 5.0.0
  • The bug does not happen with Stream Collector 2.9.1/Enrich 5.0.0

We noticed the bug while upgrading our components. We were running with Collector 2.9.1/Enrich 5.0.0 for a while and then jumped to Collector 3.2.0/Enrich 5.0.0 when we suddenly noticed the issue. Hope this helps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions