Giter Club home page Giter Club logo

Comments (5)

ruflin avatar ruflin commented on May 8, 2024

Agree that this could be potentially simplified through one of the two methods you mentioned. If you have suggestions, feel free to also directly open a PR. Sometimes discussing code is easier :-)

from apm-server.

nexthack avatar nexthack commented on May 8, 2024

Can I find some more info on the role of the processors ? Might be that helps.

A direct way can be as below

type Processor interface {
	Validate(io.Reader) error
	Payload
	Name() string
}

type processor struct {} // this struct can implement the default methods.

func (p *processor) Transform() []beat.Event {
	return p.payload.Transform()
}

Now for transaction processor we can embed the base processor so that it can access all methods of the base.

type TxProcessor struct {
  Processor
}

from apm-server.

ruflin avatar ruflin commented on May 8, 2024

The role of processors is to take data, validate it, transform it and convert one input event to one or multiple output events.

Composing the Processors from a base processor is very/same as we do with MetricSets in metricbeat: https://github.com/elastic/beats/blob/master/metricbeat/module/apache/status/status.go#L44 So it's definitively a direction I like.

I would also like to get @simitt and @jalvz involved on this as they were thinking about how to better structure the code quite a bit.

from apm-server.

nexthack avatar nexthack commented on May 8, 2024

Sure.Will implement once we have some consensus.

from apm-server.

nexthack avatar nexthack commented on May 8, 2024

Will start on this.

from apm-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.