Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/awsfirehose] Implement encoding extension framework #37113

Open
axw opened this issue Jan 9, 2025 · 11 comments · May be fixed by #37262
Open

[receiver/awsfirehose] Implement encoding extension framework #37113

axw opened this issue Jan 9, 2025 · 11 comments · May be fixed by #37262
Labels

Comments

@axw
Copy link
Contributor

axw commented Jan 9, 2025

Component(s)

receiver/awsfirehose

Is your feature request related to a problem? Please describe.

awsfirehosereceiver has a limited set of baked-in unmarshallers: cwlogs (CloudWatch logs), cwmetrics (CloudWatch metric streams JSON format), otlp_v1 (CloudWatch metric streams OTLP 1.0 format).

Firehose itself does not know or care about the format of data records. In theory you could write OTLP logs to a delivery stream using https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecord.html, but there is no way for the receiver to unmarshal this. OTLP is just an example: one might produce arbitrary observability data (or other types of data, but out of scope here) to Firehose, which also cannot be decoded without additional unmarshallers.

The unmarshallers within the awsfirehosereceiver module may also be useful for other receivers, e.g. in the S3 receiver for decoding data sent by Firehose to an S3 bucket. Since they are internal to the module, they cannot be reused.

Describe the solution you'd like

I would like to enhance the receiver to implement the encoding extension framework, so that users may inject additional encodings. I have created an untested PoC of this at axw@1904aa5. In that PoC I have left the existing unmarshallers in the receiver, but I would envisage them eventually moving to dedicated extension components.

Describe alternatives you've considered

No response

Additional context

No response

@axw axw added enhancement New feature or request needs triage New item requiring triage labels Jan 9, 2025
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@axw
Copy link
Contributor Author

axw commented Jan 9, 2025

If this direction is acceptable, I would be happy to polish and contribute the branch I referenced above.

@axw axw changed the title Update unmarshalers to implement [receiver/awsfirehose] Implement encoding extension framework Jan 9, 2025
@VihasMakwana
Copy link
Contributor

This sounds like a valid request to me.

FWIW, there are many components that use custom unmarshalers/marshalers. Now that we have encoding extension, we should do this for all such components.

@VihasMakwana VihasMakwana removed the needs triage New item requiring triage label Jan 9, 2025
@axw
Copy link
Contributor Author

axw commented Jan 13, 2025

/label waiting-for-code-owners

@MovieStoreGuy
Copy link
Contributor

Not sure for Firehose strictly, however the extension paths makes sense to me and embracing that adoption.

@Aneurysm9
Copy link
Member

This seems reasonable to me. I might have some concerns about the implementation, but I'll defer those until it's out of draft.

@axw
Copy link
Contributor Author

axw commented Jan 16, 2025

Thanks for the feedback, I'll clean up the branch and open a PR soon.

@axw
Copy link
Contributor Author

axw commented Jan 16, 2025

/label -waiting-for-code-owners

@axw
Copy link
Contributor Author

axw commented Jan 16, 2025

@Aneurysm9 seeing as the receiver has alpha stability, there's technically an option to break config straight away. Would you prefer:

  1. Wait for Add cloudwatch encoding #37222 and then immediately remove the built-in unmarshallers and record_type config, adding an encoding config that supports only extensions
  2. Provide backwards compatibility and remove the built-in unmarshallers later on once 37222 has baked: [receiver/awsfirehose] Add support for encoding extensions #37262

@Aneurysm9
Copy link
Member

Regardless of stability level my preference is to not make unnecessary breaking changes and to do as much as possible to both ease the transition and provide as much notice and time for users to adapt as possible. I don't think there's any reason not to follow the standard breaking changes process here.

@axw
Copy link
Contributor Author

axw commented Jan 17, 2025

@Aneurysm9 sounds good, thanks - that's my preference too. #37262 maintains backwards compatibility but deprecates the old config, so it's ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants