Skip to content

SigV4 Log Exporter #233

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
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Jeel-mehta
Copy link
Contributor

@Jeel-mehta Jeel-mehta commented Aug 1, 2025

Description of changes:

This PR introduces an OTLP Log Exporter implementation that enables sending logs to AWS CloudWatch using the OTLP endpoint. The implementation has been tested via manual instrumentation and successfully delivers logs to CloudWatch.

Key Components

  • OtlpAwsLogExporter.cs: Main exporter implementation with AWS SigV4 authentication support
  • OtlpExporterUtils.cs: Utility class for OTLP serialization using reflection

Features

  • AWS SigV4 authentication for secure log delivery
  • Configurable log group and stream support
  • Retry mechanism with exponential backoff
  • Proper error handling and logging
  • Compatible with OpenTelemetry Protocol specification

Configuration

The exporter requires the following environment variables:

OTEL_EXPORTER_OTLP_LOGS_ENDPOINT=https://logs.[AWSRegion].amazonaws.com/v1/logs
OTEL_AWS_SIG_V4_ENABLED=true
OTEL_EXPORTER_OTLP_LOGS_HEADERS=x-aws-log-group=your-log-group,x-aws-log-stream=your-log-stream

Current Limitations

Auto-instrumentation is not yet available as the upstream OpenTelemetry implementation does not currently provide a way to customize the LogProvider. This will be addressed in future updates once upstream support becomes available.

Testing

The implementation has been manually tested with the following scenarios:

  • Successfully sending logs to CloudWatch
  • Proper authentication using AWS credentials
  • Retry mechanism for failed requests
  • Correct log group and stream mapping

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Jeel-mehta Jeel-mehta requested a review from a team as a code owner August 1, 2025 21:53
@Jeel-mehta Jeel-mehta requested a review from srprash August 1, 2025 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant