Skip to content

Conversation

@constanca-m
Copy link
Contributor

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.

// 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"
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

Copy link
Contributor

@axw axw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@atoulme atoulme merged commit 369e358 into open-telemetry:main Mar 21, 2025
171 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 21, 2025
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
…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.-->
@constanca-m constanca-m deleted the aws-subscription-unmarshaler branch May 14, 2025 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants