Skip to content

Commit

Permalink
Merge pull request #1007 from openmeterio/refactor-kafka-metrics
Browse files Browse the repository at this point in the history
refactor: mk Kafka metrics pkg public
  • Loading branch information
chrisgacsal authored Jun 13, 2024
2 parents 7375634 + 31c9c8a commit d8ffb7a
Show file tree
Hide file tree
Showing 14 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import (
"github.com/openmeterio/openmeter/internal/ingest/ingestdriver"
"github.com/openmeterio/openmeter/internal/ingest/kafkaingest"
"github.com/openmeterio/openmeter/internal/ingest/kafkaingest/serializer"
kafkametrics "github.com/openmeterio/openmeter/internal/kafka/metrics"
"github.com/openmeterio/openmeter/internal/meter"
"github.com/openmeterio/openmeter/internal/namespace"
"github.com/openmeterio/openmeter/internal/namespace/namespacedriver"
Expand All @@ -56,6 +55,7 @@ import (
"github.com/openmeterio/openmeter/pkg/framework/operation"
"github.com/openmeterio/openmeter/pkg/gosundheit"
pkgkafka "github.com/openmeterio/openmeter/pkg/kafka"
kafkametrics "github.com/openmeterio/openmeter/pkg/kafka/metrics"
"github.com/openmeterio/openmeter/pkg/models"
"github.com/openmeterio/openmeter/pkg/slicesx"
)
Expand Down
4 changes: 2 additions & 2 deletions internal/ingest/kafkaingest/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"go.opentelemetry.io/otel/metric"

"github.com/openmeterio/openmeter/internal/ingest/kafkaingest/serializer"
kafkametrics "github.com/openmeterio/openmeter/internal/kafka/metrics"
kafkastats "github.com/openmeterio/openmeter/internal/kafka/metrics/stats"
kafkametrics "github.com/openmeterio/openmeter/pkg/kafka/metrics"
kafkastats "github.com/openmeterio/openmeter/pkg/kafka/metrics/stats"
)

// Collector is a receiver of events that handles sending those events to a downstream Kafka broker.
Expand Down
4 changes: 2 additions & 2 deletions internal/sink/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (

"github.com/openmeterio/openmeter/internal/dedupe"
"github.com/openmeterio/openmeter/internal/ingest/kafkaingest/serializer"
kafkametrics "github.com/openmeterio/openmeter/internal/kafka/metrics"
kafkastats "github.com/openmeterio/openmeter/internal/kafka/metrics/stats"
"github.com/openmeterio/openmeter/internal/meter"
kafkametrics "github.com/openmeterio/openmeter/pkg/kafka/metrics"
kafkastats "github.com/openmeterio/openmeter/pkg/kafka/metrics/stats"
)

var namespaceTopicRegexp = regexp.MustCompile(`^om_([A-Za-z0-9]+(?:_[A-Za-z0-9]+)*)_events$`)
Expand Down
2 changes: 1 addition & 1 deletion openmeter/ingest/kafkaingest/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"go.opentelemetry.io/otel/metric"

"github.com/openmeterio/openmeter/internal/ingest/kafkaingest"
kafkametrics "github.com/openmeterio/openmeter/internal/kafka/metrics"
"github.com/openmeterio/openmeter/openmeter/ingest/kafkaingest/serializer"
kafkametrics "github.com/openmeterio/openmeter/pkg/kafka/metrics"
)

// Collector is a receiver of events that handles sending those events to a downstream Kafka broker.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"

"github.com/openmeterio/openmeter/internal/kafka/metrics/stats"
"github.com/openmeterio/openmeter/pkg/kafka/metrics/stats"
)

type BrokerMetrics struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"

"github.com/openmeterio/openmeter/internal/kafka/metrics/stats"
"github.com/openmeterio/openmeter/pkg/kafka/metrics/stats"
)

type ConsumerGroupMetrics struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"

"github.com/openmeterio/openmeter/internal/kafka/metrics/stats"
"github.com/openmeterio/openmeter/pkg/kafka/metrics/stats"
)

// Metrics stores set of Kafka client related metrics
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"

"github.com/openmeterio/openmeter/internal/kafka/metrics/stats"
"github.com/openmeterio/openmeter/pkg/kafka/metrics/stats"
)

type TopicMetrics struct {
Expand Down

0 comments on commit d8ffb7a

Please sign in to comment.