-
Notifications
You must be signed in to change notification settings - Fork 13
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
DEVPROD-5303: Track sectioning analytics #328
Conversation
…e are auto filtered
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.
analytics lgtm
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.
seems like this file got added accidentally (maybe add to .gitignore
)?
open: !open, | ||
"section.name": commandName, | ||
"section.type": "command", | ||
status, |
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.
I think the attributes should reference their parent object (otherwise we could ask, is it a task status? is it a build status? some other evergreen status?)
status, | |
"section.nested": !isTopLevelCommand, | |
"section.open": !open, | |
"section.status": status, |
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.
I used "section.name" instead of "name" because "name" was already taken. The docs mention that namespaces should be primiarily be used to avoid name collisions and not indicate hierarchies. The docs aren't really clear what is considered a naming collision though. Your example does kind of highlight a naming collision between status types.
nested: false, | ||
open: !open, | ||
"section.name": functionName, | ||
"section.type": "function", | ||
status, |
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.
same comment
sendEvent({ | ||
"function.name": functionName, | ||
name: "Clicked open subsections button", | ||
status, |
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.
status, | |
"function.status": status, |
sendEvent({ | ||
"function.name": functionName, | ||
name: "Clicked close subsections button", | ||
status, |
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.
status, | |
"function.status": status, |
"jump.to.failing.line.enabled": settings.jumpToFailingLineEnabled, | ||
name: "Viewed log with sections and jump to failing line", | ||
"sections.enabled": settings.sectionsEnabled, |
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.
possibly want to reference settings as a parent object:
"jump.to.failing.line.enabled": settings.jumpToFailingLineEnabled, | |
name: "Viewed log with sections and jump to failing line", | |
"sections.enabled": settings.sectionsEnabled, | |
"settings.jump.to.failing.line.enabled": settings.jumpToFailingLineEnabled, | |
name: "Viewed log with sections and jump to failing line", | |
"settings.sections.enabled": settings.sectionsEnabled, |
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.
I think it's okay to not indicate hierarchy here because the names are unique
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.
I actually agree with Minna here. I'm planning on reviewing all of our span attributes in our projects and adding this hierarchy. So that it better falls in line with otel standards and avoids excessive dot notation.
settings.jump_to_failing_line.enabled
settings.sections.enabled
I'm planning on doing this in a follow up pr but I just wanted to shed some light on my intentions.
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.
ah that's a good callout, jump.to.failing.line
probably creates excessive namespaces that we would never use otherwise (jump
, jump.to
, jump.to.failing
)
@@ -6,6 +6,7 @@ cypress/screenshots/ | |||
/src/**/*.css | |||
build.txt | |||
build.txt-e | |||
vite.config.ts.timestamp-* |
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.
What is this?
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.
it's from a vite bug: vitejs/vite#13267
DEVPROD-5303
Description
These code changes are based off of #325
Allow tracking section toggling with insights on command vs function, nested vs unnested and section pass/fail status when applicable.
Also allow tracking if the log loaded with jump to failing line and sectioning.
Have you have updated the analytics documentation if necessary?
The analytics doc has been updated.