Skip to content

Comments

chore: enrich and improve telemetry events #29

Merged
tiurin merged 10 commits intomainfrom
adjust-events-struct
Sep 9, 2025
Merged

chore: enrich and improve telemetry events #29
tiurin merged 10 commits intomainfrom
adjust-events-struct

Conversation

@anisaoshafi
Copy link
Collaborator

@anisaoshafi anisaoshafi commented Sep 4, 2025

  • added auth_token to events after auth_token_configured (read it from .localstack/auth.json file when possible)
  • retry info endpoint [1] to improve session_id capture rate for emulator.started events
  • removed expected_steps from setup_started event
  • renamed position to step_order
  • changed SCHEMA_VERSION: 1 -> 2
  • added license_setup_ended event
  • changed steps for "setup_ended" event
  • capture "setup_ended" when user cancels
  • capture "skipped" events better.

[1] We were not capturing the emulator session_id quite well in the emulator.started events.
We rely on endpoint http://localhost:4566/_localstack/info to grab it, however the endpoint is not immediately available when we just start localstack (needs to be in running state). It needs a couple of seconds before it's accessible (some 4-6 seconds in my local tests).
Now we retry up to 10x and wait 1s each time before sending the event to make sure we get the session_id as often as possible.

@anisaoshafi anisaoshafi force-pushed the adjust-events-struct branch 4 times, most recently from 12318b7 to 8c48605 Compare September 5, 2025 13:04
@anisaoshafi anisaoshafi marked this pull request as ready for review September 5, 2025 14:39
@anisaoshafi anisaoshafi requested a review from skyrpex September 5, 2025 15:50
Copy link
Collaborator

@skyrpex skyrpex left a comment

Choose a reason for hiding this comment

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

Thank you, great job with the changes... Hope that the git conflict is easy to solve. I can help otherwise.

@anisaoshafi anisaoshafi force-pushed the adjust-events-struct branch 3 times, most recently from 6ccaa05 to 62a515c Compare September 5, 2025 16:40
Copy link
Collaborator

@tiurin tiurin left a comment

Choose a reason for hiding this comment

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

Thank you for adding telemetry to licensing code and for the rest of improvements!

There is one incorrect status report that needs to be fixed and the rest are non-blocking suggestions.

@anisaoshafi anisaoshafi marked this pull request as draft September 8, 2025 10:56
@anisaoshafi anisaoshafi force-pushed the adjust-events-struct branch 3 times, most recently from 7658c70 to 906f37f Compare September 8, 2025 14:11
@anisaoshafi anisaoshafi marked this pull request as ready for review September 8, 2025 14:18
@anisaoshafi anisaoshafi requested a review from tiurin September 8, 2025 14:21
@anisaoshafi anisaoshafi force-pushed the adjust-events-struct branch 2 times, most recently from 5f67cd8 to 01394a6 Compare September 9, 2025 11:41
@anisaoshafi anisaoshafi requested a review from tiurin September 9, 2025 11:42
}

export function get_setup_ended(
cli_status: "COMPLETED" | "SKIPPED" | "CANCELLED",
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 Let's iterate on positional arguments vs. a record in the upcoming PR!

@tiurin tiurin merged commit a20e424 into main Sep 9, 2025
3 checks passed
@tiurin tiurin deleted the adjust-events-struct branch September 9, 2025 12:36
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.

3 participants