Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(metrics-summaries): Remove metrics summaries from the codebase #532

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading