Make analytics multi-backend, add native solution#1090
Draft
gmarull wants to merge 6 commits intocoredevices:mainfrom
Draft
Make analytics multi-backend, add native solution#1090gmarull wants to merge 6 commits intocoredevices:mainfrom
gmarull wants to merge 6 commits intocoredevices:mainfrom
Conversation
fe1ee92 to
fce9770
Compare
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
So we can use multiple backends at the same time. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
fce9770 to
5290603
Compare
Collaborator
|
just updated eng-dash to match this format. @sjp4 can you add this to mobile pls? |
sjp4
reviewed
Apr 14, 2026
|
|
||
| PBL_ASSERTN(dls_initialized()); | ||
|
|
||
| s_dls_session = dls_create(DlsSystemTagAnalyticsDeviceHeartbeat, DATA_LOGGING_BYTE_ARRAY, |
Member
There was a problem hiding this comment.
Should we use a different/new tag for this? The existing tag will be reporting from legacy firmwares with a different format, so maybe we should separate this format
Member
Author
The new mechanism should work as follows:
This makes sure the backend will always store new metrics without any changes, and that non-released builds will be ignored (no ELF match). |
Add the native analytics backend that logs heartbeat records via DLS. Metrics are stored in flat arrays indexed by key enum and serialized into a packed struct on each heartbeat. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
5290603 to
f01df02
Compare
Add a pyelftools-based script that extracts the native_heartbeat_record struct layout from ELF DWARF debug info, printing field names, offsets, sizes, and types. Uses a fast binary search in .debug_str/.debug_info to locate the right CU, avoiding full DWARF parsing. Useful for building parsers for the analytics DLS blob. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
f01df02 to
afee44a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This transforms the analytics service into multi-backend capable. It also adds a native backend option that does not rely on third-party services. Compared to the old native implementation, here we should not rely on any fixed blob layout. Instead, the ELF file can be used to obtain the actual blob layout/fields/sizes, etc. (see the last commit with a tool that shows how to do that).
Needs some testing...!