refactor: remove telemetry from getter and setter functions
This commit is contained in:
parent
311de674ba
commit
c0f069b3c0
@ -132,33 +132,17 @@ func (p *Plug) Listen(ctx context.Context) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *Plug) GetSource() models.Source {
|
func (p *Plug) GetSource() models.Source {
|
||||||
_, span := tracer.Start(p.ctx, "GetSource")
|
|
||||||
defer span.End()
|
|
||||||
|
|
||||||
span.SetAttributes(attribute.String("source_domain", string(p.source.Domain)))
|
|
||||||
return p.source
|
return p.source
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Plug) TaskExecutionFunction(function TaskExecution) {
|
func (p *Plug) TaskExecutionFunction(function TaskExecution) {
|
||||||
_, span := tracer.Start(p.ctx, "TaskExecutionFunction")
|
|
||||||
defer span.End()
|
|
||||||
|
|
||||||
p.taskExecutionFunction = function
|
p.taskExecutionFunction = function
|
||||||
span.AddEvent("Task execution function set")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Plug) SendMessageExecution(function SendMessageExecution) {
|
func (p *Plug) SendMessageExecution(function SendMessageExecution) {
|
||||||
_, span := tracer.Start(p.ctx, "SendMessageExecution")
|
|
||||||
defer span.End()
|
|
||||||
|
|
||||||
p.sendMessageExecution = function
|
p.sendMessageExecution = function
|
||||||
span.AddEvent("Send message execution function set")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Plug) GetMessageExecution(function GetMessageExecution) {
|
func (p *Plug) GetMessageExecution(function GetMessageExecution) {
|
||||||
_, span := tracer.Start(p.ctx, "GetMessageExecution")
|
|
||||||
defer span.End()
|
|
||||||
|
|
||||||
p.getMessageExecution = function
|
p.getMessageExecution = function
|
||||||
span.AddEvent("Get message execution function set")
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user