Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement tracking as per spec #1020

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

feat: implement tracking as per spec #1020

wants to merge 5 commits into from

Conversation

toddbaert
Copy link
Member

@toddbaert toddbaert commented Sep 20, 2024

📣 This was a draft for a while, but is now ready for review! 📣

This implements tracking as per spec, in the server, web, and react SDKs.
I don't think the Angular or Nest SDKs need specific implementations, but please advise (cc @luizgribeiro @lukas-reining).

Fixes: #1033
Fixes: #1034

toddbaert added a commit that referenced this pull request Oct 16, 2024
Inspired by [this
comment](#1020 (comment))
I've added a lint rule to enforce `import type`, and some additional
package changes to add a `lint:fix`.

The only changes I made manually here is to add the lint rule, and the
package.json script. All the changes are auto-generated by the
`lint:fix`.

---------

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
};
}

private shortCircuitIfNotReady() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] I am not sure if it makes sense to unify this method somewhere, as we use it in both implementations and if something changes, it will most likely also change here

Copy link
Member Author

@toddbaert toddbaert Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is harder than it sounds because the server/web actually both use different enums since there's more types in client; it's doable but involves some "fun" generics and lambdas which are probably more trouble than the improvement is worth.

The `tracking API` enables the association of feature flag evaluations with subsequent actions or application states, in order to facilitate experimentation and analysis of the impact of feature flags on business objectives.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@toddbaert
Copy link
Member Author

This is ready for review now.

Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
Signed-off-by: Todd Baert <todd.baert@dynatrace.com>
@beeme1mr beeme1mr requested a review from wichopy October 21, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Implement Tracking for JS (Web) [FEATURE] Implement Tracking for JS (Server)
7 participants