-
Notifications
You must be signed in to change notification settings - Fork 113
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
[KED-2804] Heap event tracking #556
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing ⭐ Just a quick question. Otherwise LGTM.
@@ -163,6 +163,11 @@ const NodeListRow = memo( | |||
<input | |||
id={id} | |||
className="pipeline-nodelist__row__checkbox" | |||
data-heap-event={ | |||
kind === 'element' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QQ: why does kind === 'element' return focusMode event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To further @limdauto 's comment above, kind === 'element'
will not indicate a focusMode event - The best way to return a focusMode event would be via the Visibility Icon, and in particular, the kind
prop that dictates the type of visibility icon that gets rendered - this will effectively help us to differentiate between the eye icon ( for tracking if users clicked to see the individual visbility of nodes), and focusMode.
src/components/icon-button/index.js
Outdated
@@ -23,6 +24,7 @@ const IconButton = ({ | |||
return visible ? ( | |||
<Container> | |||
<button | |||
data-heap-event={dataHeapEvent} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this relies on the prop that is passed down from iconButton
, we would need a test to indicate the right type of prop gets passed in from the metadata panel for this heap event.
data-heap-event={ | ||
kind === 'element' | ||
? `focusMode.checked.${checked}` | ||
: `visible.${name}.${checked}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given that we are expecting different heap events to be sent for different node types ( dataset
, Parameters
, Nodes
), we would need to add in the relevant test to ensure the right heap event gets assigned for each node type.
@@ -153,6 +153,7 @@ export const drawNodes = function (changed) { | |||
enterNodes | |||
.attr('tabindex', '0') | |||
.attr('class', 'pipeline-node') | |||
.attr('data-heap-event', (node) => `clicked.graph.${node.type}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to my comment for the visible
heap events, we would need to add tests for each type of node to ensure the right heap event gets sent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for setting this up! While we need to obtain confirmation from @datajoely on receiving the heap events, we would also need to add tests to ensure the right heap events gets assigned on the FE - this would apply to each heap event listed, in particular for the events to indicate the different types of nodes (visible.dataset.true/false
, visible.Datasets.true/false
, visible.Parameters.true/false
; clicked.sidebar.task
, clicked.sidebar.dataset
, clicked.sidebar.Parameter
, etc).
Yup, thanks Susanna! I need Joel to approve the names -- and he will also be checking if this works at his end. Once that'd one, I will work on adding the tests. |
any reason why this never went in? |
I can't say. Last thing @rashidakanchwala wrote was:
Are the names approved and is it working on your end? If so, perhaps Rashida needs to add some tests? |
hi @datajoely , shld i push it in anyway? I remember last heap call we had, we were able to see data-heap-event in the heap dashboard but i remember you weren't able to filter by that tag in your reports. I don't know who is going to take over the heap stuff after you. Maybe Nero? |
I'm happy to keep leading it - @limdauto do you know where this was left? |
@rashidakanchwala @datajoely what is required? |
Let's wait for @limdauto to respond as I'm not sure where he got to on this |
Hello @datajoely and @NeroOkwa - I will be looking into this in the meantime to help push this across the line. @datajoely - in following up on what @rashidakanchwala mentioned above, let's get on a call to confirm if the heap events as set up here are tracked on the dashboard? We can ideally use this chance to also add in any further events for our newer features ( experiment-tracking, etc). |
Hello, I didn't get too far on this one till now due to limited availability after I left. Let me summarise the chain of events here: What happened
So this one is on me. I'm sorry... ChallengesA major roadblock I faced when trying to fix this problem was to understand how the data flow from heap to snowflake. It has always been quite opague. I still don't know how it works. From my perspective, what Rashida and I did were in accordance with Heap's suggestion, so I believe the problem lies somewhere between Heap and Snowflake. My plan was to setup a test personal snowflake account and try to get these data across but this is a challenge that requires time which I don't have at the moment. I have also lost the ability to come next to Joel's desk and pair on this. SuggestionThat said, to debug this end-to-end, I'd need access to the Heap -> Snowflake pipeline somehow OR I'd need to resume trying to setup a snowflake account to test. |
@studioswong that script is programmtically injected if and only if user has given consent to telemetry.
Like I said, we saw the events flowing through from Viz to Heap, so this is not the issue. It's the next hop from Heap to Snowflake that's causing problem. |
I see, thanks a lot for the clarification @limdauto, totally makes sense! Just to make sure, Events flow from Kedro App --> Heap (shows up in dashboard) --> snowflake? In trying to confirm that events are at least flowing to Heap, @rashidakanchwala and I caught up and did some testing to see if the events are tracked on the heap dashboard by running this branch locally, but we are unable to see any events showing up across all 3 Heap environments (dev, prod, qa) for Kedro-App - she mentioned that she recall running this branch locally last time when she was testing with @datajoely when the events showed up on the dashboard. @limdauto , would love your thoughts on the following few things to help with our testing:
Rashida also mentioned that in the previous testing, Joel had to specify some ID before the events showing up, hence we are also unsure on any further step we need to do on the dashboard side in order to enable those events to show up under "Live" events -would love to get some pointers from @datajoely on that front. Given the lack of context and documentation on the Heap setup, it does seem counter-productive for us to test this this week until @datajoely is back - this would be a great chance to involve @NeroOkwa for us to get accustomed to the heap dashboard and setup as well. In the meantime, this reminds us that we definitely need to document our Heap setup - issue filed here. |
This has definitely, 100% worked in the past. We checked it multiple times. If it doesn't work now, maybe something else has changed. In fact, I just looked up the PR that implemented this in the first place: #481 -- you could see a screenshot here with events like
Locally, you can point it to a test project with a
To put it differently, Kedro-Viz uses the same accounts as Kedro framework. That was a hard requirement: we wanted to be able to see in sequence: people run a command, then click on some elements. Refer to my screenshot earlier for an example.
I have no idea what this means. |
awesome, thanks for all the context with the PRs and the setup for the consent @limdauto! I'm sure the heap setup works as I do see all the events flowing into HEAP - Just wanted to ensure what we had set up in this PR is sending before we merge this in ( sidenote: we will have to add in FE tests for those as well). I'll mock the consent on my local project and try that again, thanks for the pointers 👍 Regardless, we will have to also confirm with product on the naming pattern of the events so best to wait for @datajoely when he's back next week to get this all sorted in one go before we merge this in ( to minimize any redundant efforts on this front.) |
Signed-off-by: Tynan DeBold <[email protected]>
Signed-off-by: Tynan DeBold <[email protected]>
…ature/heap-event-tracking#ked2804 Signed-off-by: Tynan DeBold <[email protected]>
An update: @limdauto and I paired a bit on this one yesterday. As he wrote on Discord: "We found out that most events on standard HTML elements work correctly except SVGs (not sure if it's just the SVG on the flowchart or all SVGs), so that means it's still worth getting the PR in as-is and do another iteration on the elements where data-heap-event doesn't pass thru." Here are the events coming through in Heap, and they're all there except for the couple that are placed on an SVG element: So let's get this in, start capturing data, and then iterate on the SVG issue. |
You have no idea how happy this makes me 🥹 No idea. I'm so happy to see this. Which elements are affected by this SVG thing? I'm still happy to get this merged. Please do loop in @studioswong on this too because I know she was working on it. |
@yetudada @tynandebold I did some more experiment. Data attributes for any SVG element such as This should be fixed in the heap sdk. |
@yetudada it's just the |
Description
To track click events on heap
below is the list of events and tracking keywords
Focus mode selected :
focusMode.checked.true/false
Layers clicked :
visible.layers.true/false
Dark/Light mode :
theme.dark/light
Sidebar closed/opened :
visible.sidebar.false/true
Tree expanded (+ what level) :
clicked.modularPipeline.true/false
(requires further work)number of Tags toggled : (to be done)
Nodes true/false :
visible.Nodes.true/false
Datasets true/False :
visible.Datasets.true/false
Parameters true/false :
visible.Parameters.true/false
Node clicked on graph:
clicked.graph.task
Node clicked on sidebar:
clicked.sidebar.task
Dataset clicked on graph:
clicked.graph.Dataset
Dataset clicked on sidebar:
clicked.sidebar.Dataset
Parameter clicked on graph:
clicked.graph.Parameter
Parameter clicked on sidebar:
clicked.sidebar.Parameter
Show code revealed :
visible.code.checked
Run command copied :
clicked.run_command
Development notes
QA notes
Checklist
RELEASE.md
fileLegal notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":
I submit this contribution under the Apache 2.0 license and represent that I am entitled to do so on behalf of myself, my employer, or relevant third parties, as applicable.
I certify that (a) this contribution is my original creation and / or (b) to the extent it is not my original creation, I am authorised to submit this contribution on behalf of the original creator(s) or their licensees.
I certify that the use of this contribution as authorised by the Apache 2.0 license does not violate the intellectual property rights of anyone else.