Skip to content

Commit

Permalink
remove some of the otel-community specific things
Browse files Browse the repository at this point in the history
  • Loading branch information
schmikei committed Dec 3, 2024
1 parent f1e6d42 commit d4fc840
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 44 deletions.
4 changes: 2 additions & 2 deletions processor/unrollprocessor/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package unrollprocessor contains the logic to unroll logs from a slice in the body field.
package unrollprocessor

import (
Expand All @@ -20,8 +21,7 @@ import (

// Config is the configuration for the unroll processor.
type Config struct {
UnrollKey string `mapstructure:"unroll_key"`
Field UnrollField `mapstructure:"field"`
Field UnrollField `mapstructure:"field"`
}

// UnrollField is the field to unroll.
Expand Down
19 changes: 0 additions & 19 deletions processor/unrollprocessor/doc.go

This file was deleted.

16 changes: 9 additions & 7 deletions processor/unrollprocessor/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,29 @@ import (
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/processor"
"go.opentelemetry.io/collector/processor/processorhelper"

"github.com/observiq/bindplane-agent/processor/unrollprocessor/internal/metadata"
)

var processorCapabilities = consumer.Capabilities{MutatesData: true}

const typeStr = "unroll"
// componentType is the value of the "type" key in configuration.
var componentType = component.MustNewType("unroll")

const (
stability = component.StabilityLevelAlpha
)

// NewFactory returns a new factory for the Transform processor.
func NewFactory() processor.Factory {
return processor.NewFactory(
metadata.Type,
componentType,
createDefaultConfig,
processor.WithLogs(createLogsProcessor, metadata.LogsStability),
processor.WithLogs(createLogsProcessor, stability),
)
}

func createDefaultConfig() component.Config {
return &Config{
UnrollKey: "message",
Field: UnrollFieldBody,
Field: UnrollFieldBody,
}
}

Expand Down
16 changes: 0 additions & 16 deletions processor/unrollprocessor/internal/metadata/generated_status.go

This file was deleted.

0 comments on commit d4fc840

Please sign in to comment.