Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .chloggen/codeboten_dep-awslogsencoding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
change_type: 'deprecation'
component: extension/aws_logs_encoding
note: Introduce new snake case compliant name `aws_logs_encoding`
issues: [46776]
2 changes: 1 addition & 1 deletion .chloggen/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ components:
- extension/ack
- extension/asapclient
- extension/avro_log_encoding
- extension/aws_logs_encoding
- extension/awscloudwatchmetricstreams_encoding
- extension/awslogs_encoding
- extension/awsproxy
- extension/azure_auth
- extension/azure_encoding
Expand Down
2 changes: 1 addition & 1 deletion .chloggen/feat_aws-logs-cloudtrail-streaming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: extension/awslogs_encoding
component: extension/aws_logs_encoding

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adopt streaming for CloudTrail signal
Expand Down
2 changes: 1 addition & 1 deletion .chloggen/feat_aws-logs-cw-subscription-streaming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: extension/awslogs_encoding
component: extension/aws_logs_encoding

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adopt encoding extension streaming contract for CloudWatch Logs subscription
Expand Down
2 changes: 1 addition & 1 deletion .chloggen/feat_aws-logs-elb-streaming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: extension/awslogs_encoding
component: extension/aws_logs_encoding

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adopt streaming for ELB signal
Expand Down
2 changes: 1 addition & 1 deletion .chloggen/feat_aws-logs-network-fw-streaming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: extension/awslogs_encoding
component: extension/aws_logs_encoding

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adopt streaming for Network Firewall logs
Expand Down
2 changes: 1 addition & 1 deletion .chloggen/feat_aws-logs-s3-access-streaming.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: extension/awslogs_encoding
component: extension/aws_logs_encoding

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adopt streaming for S3 access logs
Expand Down
2 changes: 1 addition & 1 deletion .chloggen/feat_aws-logs-vpc-flow-logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: extension/awslogs_encoding
component: extension/aws_logs_encoding

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adopt encoding extension streaming contract for VPC flow logs
Expand Down
2 changes: 1 addition & 1 deletion .chloggen/feat_aws-logs-waf-logs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: extension/awslogs_encoding
component: extension/aws_logs_encoding

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Adopt encoding extension streaming contract for WAF logs
Expand Down
4 changes: 3 additions & 1 deletion extension/encoding/awslogsencodingextension/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ import (

"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/extension"
"go.opentelemetry.io/collector/extension/xextension"

"github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/awslogsencodingextension/internal/constants"
"github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/awslogsencodingextension/internal/metadata"
vpcflowlog "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/awslogsencodingextension/internal/unmarshaler/vpc-flow-log"
)

func NewFactory() extension.Factory {
return extension.NewFactory(
return xextension.NewFactory(
metadata.Type,
createDefaultConfig,
createExtension,
metadata.ExtensionStability,
xextension.WithDeprecatedTypeAlias(metadata.DeprecatedType),
)
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions extension/encoding/awslogsencodingextension/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ require (
go.opentelemetry.io/collector/confmap/xconfmap v0.147.1-0.20260309153054-85fc1918516c
go.opentelemetry.io/collector/extension v1.53.1-0.20260309153054-85fc1918516c
go.opentelemetry.io/collector/extension/extensiontest v0.147.1-0.20260309153054-85fc1918516c
go.opentelemetry.io/collector/extension/xextension v0.147.1-0.20260309153054-85fc1918516c
go.opentelemetry.io/collector/featuregate v1.53.1-0.20260309153054-85fc1918516c
go.opentelemetry.io/collector/pdata v1.53.1-0.20260309153054-85fc1918516c
go.opentelemetry.io/otel v1.42.0
Expand Down
2 changes: 2 additions & 0 deletions extension/encoding/awslogsencodingextension/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion extension/encoding/awslogsencodingextension/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
display_name: AWS Logs Encoding Extension
type: awslogs_encoding
type: aws_logs_encoding
deprecated_type: awslogs_encoding

description: This extension unmarshalls logs encoded in formats produced by AWS services.

Expand Down
24 changes: 12 additions & 12 deletions extension/encoding/awslogsencodingextension/testdata/config.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
awslogs_encoding:
aws_logs_encoding:

awslogs_encoding/cloudwatch:
aws_logs_encoding/cloudwatch:
format: cloudwatch

awslogs_encoding/text_vpcflow:
aws_logs_encoding/text_vpcflow:
format: vpcflow
vpcflow:
file_format: plain-text

awslogs_encoding/text_vpc_flow_log:
aws_logs_encoding/text_vpc_flow_log:
format: vpc_flow_log
vpc_flow_log:
file_format: plain-text

awslogs_encoding/parquet_vpcflow:
aws_logs_encoding/parquet_vpcflow:
format: vpcflow
vpcflow:
file_format: parquet

awslogs_encoding/invalid_vpcflow:
aws_logs_encoding/invalid_vpcflow:
format: vpcflow
vpcflow:
file_format: invalid

awslogs_encoding/invalid_vpc_flow_log:
aws_logs_encoding/invalid_vpc_flow_log:
format: vpc_flow_log
vpc_flow_log:
file_format: invalid

awslogs_encoding/s3access:
aws_logs_encoding/s3access:
format: s3access

awslogs_encoding/waf:
aws_logs_encoding/waf:
format: waf

awslogs_encoding/cloudtrail:
aws_logs_encoding/cloudtrail:
format: cloudtrail

awslogs_encoding/elbaccess:
aws_logs_encoding/elbaccess:
format: elbaccess

awslogs_encoding/networkfirewall:
aws_logs_encoding/networkfirewall:
format: networkfirewall
20 changes: 10 additions & 10 deletions receiver/awslambdareceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ S3 events are handled in the following manner:
- Download S3 object payload
- Decode payload using the configured encoding extension
- Default encoding: Preserve S3 object content as-is
- Custom encoding: Use specified encoding extension (for example, `awslogs_encoding` for AWS log formats)
- Custom encoding: Use specified encoding extension (for example, `aws_logs_encoding` for AWS log formats)
- Metrics use `awscloudwatchmetricstreams_encoding` extension by default

### CloudWatch Logs subscription
Expand All @@ -66,7 +66,7 @@ CloudWatch Logs events are handled in the following manner:
- Parse the CloudWatch Logs message (note - unlike S3 events, the payload is included in the event)
- Decode payload using the configured encoding extension
- Default encoding: Parse CloudWatch Logs messages to OpenTelemetry log records
- Custom encoding: Use specified encoding extension (for example, `awslogs_encoding` for AWS log formats)
- Custom encoding: Use specified encoding extension (for example, `aws_logs_encoding` for AWS log formats)

### Configurations

Expand All @@ -92,10 +92,10 @@ Given below are example configurations for various use cases.
receivers:
awslambda:
s3:
encoding: awslogs_encoding
encoding: aws_logs_encoding

extensions:
awslogs_encoding:
aws_logs_encoding:
format: vpcflow
vpcflow:
file_format: plain-text
Expand All @@ -106,15 +106,15 @@ exporters:

service:
extensions:
- awslogs_encoding
- aws_logs_encoding
pipelines:
logs:
receivers: [awslambda]
exporters: [otlp_http]
```

In this example, the `awslambdareceiver` is expected to be triggered when a VPC flow log is created at S3 bucket.
The receiver retrieves the log file from S3 and decodes it using the `awslogs_encoding` extension with the `vpcflow` format.
The receiver retrieves the log file from S3 and decodes it using the `aws_logs_encoding` extension with the `vpcflow` format.
Parsed logs are forwarded to an OTLP listener via the `otlp_http` exporter.

### Example 2: ELB Access Logs from S3
Expand All @@ -123,10 +123,10 @@ Parsed logs are forwarded to an OTLP listener via the `otlp_http` exporter.
receivers:
awslambda:
s3:
encoding: awslogs_encoding
encoding: aws_logs_encoding

extensions:
awslogs_encoding:
aws_logs_encoding:
format: elbaccess
elbaccess:
file_format: plain-text
Expand All @@ -137,7 +137,7 @@ exporters:

service:
extensions:
- awslogs_encoding
- aws_logs_encoding
pipelines:
logs:
receivers: [awslambda]
Expand Down Expand Up @@ -233,7 +233,7 @@ To enable this feature, set the `failure_bucket_arn` configuration to the ARN of
receivers:
awslambda:
s3:
encoding: awslogs_encoding
encoding: aws_logs_encoding
failure_bucket_arn: "arn:aws:s3:::example"
```

Expand Down
6 changes: 3 additions & 3 deletions receiver/awslambdareceiver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ func TestLoadConfig(t *testing.T) {
}{
{
name: "Config with both S3 and CloudWatch encoding",
componentIDToLoad: component.NewIDWithName(metadata.Type, "awslogs_encoding"),
componentIDToLoad: component.NewIDWithName(metadata.Type, "aws_logs_encoding"),
expected: &Config{
S3: sharedConfig{
Encoding: "awslogs_encoding",
Encoding: "aws_logs_encoding",
},
CloudWatch: sharedConfig{
Encoding: "awslogs_encoding",
Encoding: "aws_logs_encoding",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion receiver/awslambdareceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func TestCreateLogs(t *testing.T) {
// Create receiver using factory with S3 encoding config.
// Note: The S3Encoding value must match the component ID used when registering the extension.

s3Encoding := "awslogs_encoding"
s3Encoding := "aws_logs_encoding"

factory := NewFactory()
cfg := factory.CreateDefaultConfig().(*Config)
Expand Down
6 changes: 3 additions & 3 deletions receiver/awslambdareceiver/testdata/config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
awslambda/awslogs_encoding:
awslambda/aws_logs_encoding:
s3:
encoding: awslogs_encoding
encoding: aws_logs_encoding
cloudwatch:
encoding: awslogs_encoding
encoding: aws_logs_encoding

awslambda/json_log_encoding:
s3:
Expand Down
2 changes: 1 addition & 1 deletion reports/distributions/contrib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ components:
extension:
- ack
- asapclient
- aws_logs_encoding
- awscloudwatchmetricstreams_encoding
- awslogs_encoding
- awsproxy
- azure_auth
- basicauth
Expand Down
Loading