Closed
Description
Component(s)
receiver/awsfirehose
What happened?
Description
The encoding
extension fails if it contains an ID with /
. The error comes from:
opentelemetry-collector-contrib/receiver/awsfirehosereceiver/receiver.go
Lines 301 to 304 in 3ebd0dd
The NewType
function:
// NewType creates a type. It returns an error if the type is invalid.
// A type must
// - have at least one character,
// - start with an ASCII alphabetic character and
// - can only contain ASCII alphanumeric characters and '_'.
Instead of encoding being a string, it could be a component.ID
to get rid of this bug.
Steps to Reproduce
You can reproduce it using:
extensions:
awslogs_encoding/cloudwatch:
format: cloudwatch_logs_subscription_filter
receivers:
awsfirehose:
endpoint: :1234
encoding: awslogs_encoding/cloudwatch
You will see the collector fails with:
Error: cannot start pipelines: failed to start "awsfirehose/cwlogs" receiver: failed to start consumer: failed to load encoding extension: invalid component type: invalid character(s) in type "awslogs_encoding/cloudwatch"
Expected Result
I expect it work without issues, and that the receiver can load the encoding extension by its ID.
Actual Result
The collector does not start:
Error: cannot start pipelines: failed to start "awsfirehose/cwlogs" receiver: failed to start consumer: failed to load encoding extension: invalid component type: invalid character(s) in type "awslogs_encoding/cloudwatch"
Collector version
v0.125.0
Environment information
Environment
OS: Ubuntu 24.10