Skip to content

Commit

Permalink
chore(metrics-summaries): Remove metrics summaries from the codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
phacops committed Nov 21, 2024
1 parent a22d50c commit e1a6a01
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 34 deletions.
9 changes: 4 additions & 5 deletions cmd/vroom/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ type (
ProfilingKafkaBrokers []string `env:"SENTRY_KAFKA_BROKERS_PROFILING" env-default:"localhost:9092"`
SpansKafkaBrokers []string `env:"SENTRY_KAFKA_BROKERS_SPANS" env-default:"localhost:9092"`

CallTreesKafkaTopic string `env:"SENTRY_KAFKA_TOPIC_CALL_TREES" env-default:"profiles-call-tree"`
MetricsSummaryKafkaTopic string `env:"SENTRY_KAFKA_TOPIC_METRICS_SUMMARY" env-default:"snuba-metrics-summaries"`
OccurrencesKafkaTopic string `env:"SENTRY_KAFKA_TOPIC_OCCURRENCES" env-default:"ingest-occurrences"`
ProfileChunksKafkaTopic string `env:"SENTRY_KAFKA_TOPIC_PROFILE_CHUNKS" env-default:"snuba-profile-chunks"`
ProfilesKafkaTopic string `env:"SENTRY_KAKFA_TOPIC_PROFILES" env-default:"processed-profiles"`
CallTreesKafkaTopic string `env:"SENTRY_KAFKA_TOPIC_CALL_TREES" env-default:"profiles-call-tree"`
OccurrencesKafkaTopic string `env:"SENTRY_KAFKA_TOPIC_OCCURRENCES" env-default:"ingest-occurrences"`
ProfileChunksKafkaTopic string `env:"SENTRY_KAFKA_TOPIC_PROFILE_CHUNKS" env-default:"snuba-profile-chunks"`
ProfilesKafkaTopic string `env:"SENTRY_KAKFA_TOPIC_PROFILES" env-default:"processed-profiles"`

SnubaHost string `env:"SENTRY_SNUBA_HOST" env-default:"http://localhost:1218"`

Expand Down
20 changes: 0 additions & 20 deletions cmd/vroom/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,6 @@ type (
VersionCode string `json:"version_code"`
VersionName string `json:"version_name"`
}

// MetricsSummaryKafkaMessage is representing the struct we send to Kafka to insert Metrics Summary in ClickHouse.
MetricsSummaryKafkaMessage struct {
Count uint64 `json:"count"`
DurationMs uint32 `json:"duration_ms"`
EndTimestamp float64 `json:"end_timestamp"`
Group string `json:"group"`
IsSegment bool `json:"is_segment"`
Max float64 `json:"max"`
Min float64 `json:"min"`
Sum float64 `json:"sum"`
Mri string `json:"mri"`
ProjectID uint64 `json:"project_id"`
Received int64 `json:"received"`
RetentionDays int `json:"retention_days"`
SegmentID string `json:"segment_id"`
SpanID string `json:"span_id"`
Tags map[string]string `json:"tags"`
TraceID string `json:"trace_id"`
}
)

func buildFunctionsKafkaMessage(p profile.Profile, functions []nodetree.CallTreeFunction) FunctionsKafkaMessage {
Expand Down
9 changes: 0 additions & 9 deletions cmd/vroom/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,6 @@ func newEnvironment() (*environment, error) {
ReadTimeout: 3 * time.Second,
WriteTimeout: 3 * time.Second,
}
e.metricSummaryWriter = &kafka.Writer{
Addr: kafka.TCP(e.config.SpansKafkaBrokers...),
Async: true,
Balancer: kafka.CRC32Balancer{},
BatchSize: 100,
ReadTimeout: 3 * time.Second,
Topic: e.config.MetricsSummaryKafkaTopic,
WriteTimeout: 3 * time.Second,
}
e.metricsClient = &http.Client{
Timeout: time.Second * 5,
Transport: &http.Transport{
Expand Down

0 comments on commit e1a6a01

Please sign in to comment.