Skip to content

New component: AWS Logs encoding extension #38627

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

Open
axw opened this issue Mar 14, 2025 · 4 comments
Open

New component: AWS Logs encoding extension #38627

axw opened this issue Mar 14, 2025 · 4 comments
Labels
Accepted Component New component has been sponsored

Comments

@axw
Copy link
Contributor

axw commented Mar 14, 2025

The purpose and use-cases of the new component

AWS has various services and formats for logs, including CloudWatch, CloudTrail, CloudFront, VPC Flow Logs, and more. Some of these logs can be stored/delivered in multiple ways, e.g. through Amazon Data Firehose, Amazon Kinesis Data Streams, Lambda, and S3.

Currently, the awsfirehose receiver has built-in support for receiving CloudWatch Logs using the log group subscription filter method, e.g. see https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/SubscriptionFilters.html#FirehoseExample

The log subscription format is not specific to Firehose, so I would like to extract it into an encoding extension so it may be developed independently of the Firehose receiver. For example, this would enable it to be used with the S3 receiver by configuring a subscription filter to send to Firehose with an S3 destination.

Rather than creating an encoding extension dedicated to just the CloudWatch log group subscription filter format, I propose we have an extension for decoding AWS logs in general. It would be possible to configure the extension with the specific format, such as CloudWatch log group subscription filter, CloudTrail, etc. By having them co-located, we can avoid proliferation of extensions, and better ensure consistency across the formats (e.g. set cloud.* SemConv fields consistently).

We would start by extracting the code at https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog and add more formats over time.

Example configuration for the component

extensions:
  awslogs_encoding/cloudwatch:
     format: "cloudwatch_logs_subscription_filter"

receivers:
  awsfirehose:
    endpoint: :1234
    encoding: awslogs_encoding/cloudwatch

Telemetry data types supported

logs

Code Owner(s)

@axw @constanca-m

Sponsor (optional)

@atoulme

Additional context

No response

@axw axw added needs triage New item requiring triage Sponsor Needed New component seeking sponsor labels Mar 14, 2025
@axw
Copy link
Contributor Author

axw commented Mar 14, 2025

P.S. this essentially the logs equivalent of #37870. The main difference is that CloudWatch is the way to do metrics in AWS, whereas there are multiple ways to do logs.

@atoulme
Copy link
Contributor

atoulme commented Mar 19, 2025

I can sponsor.

@atoulme atoulme added Accepted Component New component has been sponsored and removed Sponsor Needed New component seeking sponsor needs triage New item requiring triage labels Mar 20, 2025
atoulme pushed a commit that referenced this issue Mar 20, 2025
#### Description

This is a new encoding extension for decoding logs from various AWS
services. We will start with the
CloudWatch Logs subscription filter format and expand to other formats,
including CloudFront access logs, VPC flow logs (text/parquet), and
more.

#### Link to tracking issue

First part of
#38627

#### Testing

Added basic unit tests.

#### Documentation

README.
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this issue Apr 24, 2025
#### Description

This is a new encoding extension for decoding logs from various AWS
services. We will start with the
CloudWatch Logs subscription filter format and expand to other formats,
including CloudFront access logs, VPC flow logs (text/parquet), and
more.

#### Link to tracking issue

First part of
open-telemetry#38627

#### Testing

Added basic unit tests.

#### Documentation

README.
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

@github-actions github-actions bot added the Stale label May 20, 2025
@axw
Copy link
Contributor Author

axw commented May 20, 2025

Still relevant, just haven't gotten around to adding the component to the distro yet. There's an open issue about adding support for WAF, we might want to get that done first, but it's not strictly necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Component New component has been sponsored
Projects
None yet
Development

No branches or pull requests

2 participants