-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[extension/awslogs_encoding] Add support for cloudwatch logs coming from subscription filter #38821
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
[extension/awslogs_encoding] Add support for cloudwatch logs coming from subscription filter #38821
Conversation
…rom subscription filter
| // Copyright The OpenTelemetry Authors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| package subscriptionfilter // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/awslogsencodingextension/unmarshaler/subscription-filter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you move this to an internal package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason this is public is so other components can use the NewSubscriptionFilterUnmarshaler function directly. For example, this would enable us to remove the cwlog code in awsfirehosereceiver.
Rather than forcing users to configure an extension, there would be a special case where the receiver will instantiate the unmarshaler directly. We could also internally create an extension, but it seems a bit unnecessarily complicated.
...ion/encoding/awslogsencodingextension/unmarshaler/subscription-filter/subscription_filter.go
Outdated
Show resolved
Hide resolved
axw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
...ion/encoding/awslogsencodingextension/unmarshaler/subscription-filter/subscription_filter.go
Outdated
Show resolved
Hide resolved
...ion/encoding/awslogsencodingextension/unmarshaler/subscription-filter/subscription_filter.go
Outdated
Show resolved
Hide resolved
...ion/encoding/awslogsencodingextension/unmarshaler/subscription-filter/subscription_filter.go
Outdated
Show resolved
Hide resolved
axw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…rom subscription filter (open-telemetry#38821) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Add support for [cloudwatch logs coming from subscription filter](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html). <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue open-telemetry#38820 <!--Describe what testing was performed and which tests were added.--> #### Testing There are unit tests for new code. <!--Describe the documentation added.--> #### Documentation Comments and unit tests should be enough. <!--Please delete paragraphs that you did not use before submitting.-->
Description
Add support for cloudwatch logs coming from subscription filter.
Link to tracking issue
#38820
Testing
There are unit tests for new code.
Documentation
Comments and unit tests should be enough.