Skip to content

[processor/logstransform]: Long running tasks uses the wrong context #31140

@BinaryFissionGames

Description

@BinaryFissionGames

Component(s)

processor/logstransform

Describe the issue you're reporting

The context passed in from Start should not be used for long-running operations; See the comment from the upstream collector:

// If the component needs to perform a long-running starting operation then it is recommended
// that Start() returns quickly and the long-running operation is performed in background.
// In that case make sure that the long-running operation does not use the context passed
// to Start() function since that context will be cancelled soon and can abort the long-running
// operation. Create a new context from the context.Background() for long-running operations.

https://github.com/open-telemetry/opentelemetry-collector/blob/9553bfeb936232fec9ff805ab763142880b391b6/component/component.go#L39-L44

This doesn't seem to actually lead to any negative effects, but it does seem that the logstransformprocessor is using the context passed in from start for long-running goroutines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingnever staleIssues marked with this label will be never staled and automatically removedprocessor/logstransformLogs Transform processor

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions