Skip to content

Commit

Permalink
Only log startup moment span if it's not triggered by a lateness timer
Browse files Browse the repository at this point in the history
  • Loading branch information
bidetofevil committed Nov 4, 2023
1 parent 364447f commit 84f0aa5
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,59 @@
"un": "John Doe",
"per": ["first_day"]
},
"spans": "__EMBRACE_TEST_IGNORE__",
"spans": [
{
"attributes": {
"emb.sequence_id": "2",
"emb.private": "true",
"emb.key": "true",
"emb.type": "PERFORMANCE"
},
"end_time_unix_nano": "__EMBRACE_TEST_IGNORE__",
"events": [
{
"attributes": {},
"name": "start-time",
"time_unix_nano": "__EMBRACE_TEST_IGNORE__"
}
],
"name": "emb-sdk-init",
"parent_span_id": "0000000000000000",
"span_id": "__EMBRACE_TEST_IGNORE__",
"start_time_unix_nano": "__EMBRACE_TEST_IGNORE__",
"status": "OK",
"trace_id": "__EMBRACE_TEST_IGNORE__"
},
{
"attributes": {
"emb.sequence_id": "3",
"emb.key": "true",
"emb.type": "PERFORMANCE"
},
"end_time_unix_nano": "__EMBRACE_TEST_IGNORE__",
"events": [],
"name": "emb-startup-moment",
"parent_span_id": "0000000000000000",
"span_id": "__EMBRACE_TEST_IGNORE__",
"start_time_unix_nano": "__EMBRACE_TEST_IGNORE__",
"status": "OK",
"trace_id": "__EMBRACE_TEST_IGNORE__"
},
{
"attributes": {
"emb.sequence_id": "1",
"emb.private": "true",
"emb.type": "SESSION"
},
"end_time_unix_nano": "__EMBRACE_TEST_IGNORE__",
"events": [],
"name": "emb-session-span",
"parent_span_id": "0000000000000000",
"span_id": "__EMBRACE_TEST_IGNORE__",
"start_time_unix_nano": "__EMBRACE_TEST_IGNORE__",
"status": "OK",
"trace_id": "__EMBRACE_TEST_IGNORE__"
}
],
"v": 13
}
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ internal class EmbraceEventService(
sessionProperties
)
if (isStartupEvent(name)) {
logStartupSpan()
if (!late) {
logStartupSpan()
}
logDeveloper("EmbraceEventService", "Ending Startup Ending")
startupEventInfo = eventHandler.buildStartupEventInfo(
originEventDescription.event,
Expand Down

0 comments on commit 84f0aa5

Please sign in to comment.