Repository navigation
feat(account-tree): add support for attribution labels in GO processor - #824
lovrocolic wants to merge 7 commits into
Conversation
|
Bug: numeric attribution values get scientific-notation labels (
Nit: the struct tags in |
Thanks! Applied fix! |
| return nil | ||
| }) | ||
|
|
||
| errGroup.Go(func() error { |
There was a problem hiding this comment.
cache is deprecated and will be removed, you can remove this part
| @@ -0,0 +1,85 @@ | |||
| package cache | |||
| @@ -0,0 +1,106 @@ | |||
| package cache | |||
247078a to
07d5eea
Compare
|
Here are few finding from a Claude code review.
|
Thanks @vincent-pochet! Regarding cache, Jeremy told me in earlier comments that it is deprecated. First version of this PR included cache for attribution types - #824 (comment) |
|
@vincent-pochet Applied fixes. Per our discussion, I removed caching but also extended billable metrics select (that runs anyway) with additional bool attribute. If organization does not have attribution types which is checked from the bool value, we will skip the attribution types fetch and do an early exit. Regarding #5, we always fetch active types and this is also checked in the read path. Reusing the same code could have an impact, but if needed we can handle it in the |
Context
Account tree attributes usage to custom types (users, teams, API keys...). The read path groups
events_enrichedbyattribution_labels, which nothing fills yet.Description
The events-processor now loads the organization's
usage_attribution_typesand stamps each enriched event withattribution_labels:{type_code => value}, taken from the first of the type'sattribution_keysfound in the properties. Events are expected to carry the full ancestor chain. Missing, nested or too-long (>255 chars) values are skipped, and the field is omitted when empty, so organizations without types are unaffected.