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

Add additional metadata to startup traces #839

Merged
merged 1 commit into from
May 13, 2024

Conversation

bidetofevil
Copy link
Collaborator

@bidetofevil bidetofevil commented May 12, 2024

Goal

Adding debugging metadata to app startup traces

Copy link
Collaborator Author

bidetofevil commented May 12, 2024

@bidetofevil bidetofevil marked this pull request as ready for review May 13, 2024 04:53
@bidetofevil bidetofevil requested a review from a team as a code owner May 13, 2024 04:53
Copy link
Contributor

@fractalwrench fractalwrench left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -376,6 +385,14 @@ internal class AppStartupTraceEmitter(
startupActivityPostCreatedMs?.let { timeMs ->
addAttribute("startup-activity-post-created-ms", timeMs.toString())
}

sdkInitEndedInForeground?.let { inForeground ->
addAttribute("embrace-init-in-foreground", inForeground.toString())
Copy link
Contributor

Choose a reason for hiding this comment

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

Should these be emb instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I actually removed the emb- prefix from the other ones too. The reason for that is because a) this is just a custom attribute on a perf trace logged by us, not an attribute in a fixed schema; b) because it's logged by us, we won't have to worry about disambiguating this with customer data; and c) I'm not convinced that these attributes will be needed in the semantic conventions even if we make app startup spans a thing, so I just want to make them more one-off.

That said, this is mostly in my mind - I should validate this with the entire group first, but lets keep this for now.

@bidetofevil bidetofevil force-pushed the hho/add-app-startup-trace-metadata branch from ce96b1f to 091ea58 Compare May 13, 2024 15:47
Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 81.07%. Comparing base (303d49b) to head (91640f2).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #839      +/-   ##
==========================================
+ Coverage   81.05%   81.07%   +0.01%     
==========================================
  Files         427      427              
  Lines       11442    11453      +11     
  Branches     1699     1700       +1     
==========================================
+ Hits         9274     9285      +11     
+ Misses       1458     1457       -1     
- Partials      710      711       +1     
Files Coverage Δ
...d/embracesdk/capture/startup/StartupServiceImpl.kt 100.00% <100.00%> (+5.55%) ⬆️
...bracesdk/capture/startup/AppStartupTraceEmitter.kt 71.58% <66.66%> (-0.17%) ⬇️

... and 3 files with indirect coverage changes

Base automatically changed from hho/add-startup-metadata to master May 13, 2024 16:37
@bidetofevil bidetofevil force-pushed the hho/add-app-startup-trace-metadata branch from 091ea58 to 91640f2 Compare May 13, 2024 16:40
@bidetofevil bidetofevil merged commit 3ddac16 into master May 13, 2024
4 checks passed
@bidetofevil bidetofevil deleted the hho/add-app-startup-trace-metadata branch May 13, 2024 18:08
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.

None yet

2 participants