Skip to content

Commit

Permalink
feat: Add more metadata fields to Chunk Kafka message (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
phacops authored Oct 4, 2024
1 parent 0057d48 commit 16074e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- Annotate flamegraph with profile data ([#501](https://github.com/getsentry/vroom/pull/501)), ([#502](https://github.com/getsentry/vroom/pull/502)), ([#503](https://github.com/getsentry/vroom/pull/503))
- Forward SDK info for sample profiles to Kafka. ([#507](https://github.com/getsentry/vroom/pull/507))
- Forward SDK info for legacy profiles to Kafka. ([#515](https://github.com/getsentry/vroom/pull/515))
- Add more metadata fields to Chunk Kafka message. ([#518](https://github.com/getsentry/vroom/pull/518))

**Bug Fixes**:

Expand Down
11 changes: 9 additions & 2 deletions cmd/vroom/chunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

"github.com/getsentry/vroom/internal/chunk"
"github.com/getsentry/vroom/internal/metrics"
"github.com/getsentry/vroom/internal/platform"
"github.com/getsentry/vroom/internal/storageutil"
)

Expand Down Expand Up @@ -300,8 +301,11 @@ type (
Received float64 `json:"received"`
RetentionDays int `json:"retention_days"`

SDKName string `json:"sdk_name"`
SDKVersion string `json:"sdk_version"`
Environment string `json:"environment"`
Platform platform.Platform `json:"platform"`
Release string `json:"release"`
SDKName string `json:"sdk_name"`
SDKVersion string `json:"sdk_version"`
}
)

Expand All @@ -311,9 +315,12 @@ func buildChunkKafkaMessage(c *chunk.Chunk) *ChunkKafkaMessage {
ChunkID: c.ID,
DurationMS: c.DurationMS(),
EndTimestamp: end,
Environment: c.Environment,
Platform: c.Platform,
ProfilerID: c.ProfilerID,
ProjectID: c.ProjectID,
Received: c.Received,
Release: c.Release,
RetentionDays: c.RetentionDays,
SDKName: c.ClientSDK.Name,
SDKVersion: c.ClientSDK.Version,
Expand Down

0 comments on commit 16074e6

Please sign in to comment.