Skip to content

Commit

Permalink
feat: make payloadmeter a package
Browse files Browse the repository at this point in the history
  • Loading branch information
shivanshuraj1333 committed Dec 28, 2024
1 parent 9756822 commit 2bbe7c6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions pkg/payloadmeter/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module payloadmeter

go 1.23.4
2 changes: 1 addition & 1 deletion pkg/metering/json.go → pkg/payloadmeter/json.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package metering
package payloadmeter

import (
"encoding/json"
Expand Down
2 changes: 1 addition & 1 deletion pkg/metering/meter.go → pkg/payloadmeter/meter.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package metering
package payloadmeter

import (
"go.opentelemetry.io/collector/pdata/plog"
Expand Down
8 changes: 4 additions & 4 deletions pkg/metering/v1/logs.go → pkg/payloadmeter/v1/logs.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package v1

import (
"github.com/SigNoz/signoz-otel-collector/pkg/metering"
"github.com/SigNoz/signoz-otel-collector/pkg/payloadmeter"
"go.opentelemetry.io/collector/pdata/plog"
"go.uber.org/zap"
)

type logs struct {
Logger *zap.Logger
Sizer metering.Sizer
Sizer payloadmeter.Sizer
}

func NewLogs(logger *zap.Logger) metering.Logs {
func NewLogs(logger *zap.Logger) payloadmeter.Logs {
return &logs{
Logger: logger,
Sizer: metering.NewJSONSizer(logger),
Sizer: payloadmeter.NewJSONSizer(logger),
}
}

Expand Down
File renamed without changes.

0 comments on commit 2bbe7c6

Please sign in to comment.