Skip to content
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

[processor/awsentity] Add awsentity processor into EMF pipeline #1482

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

zhihonl
Copy link
Contributor

@zhihonl zhihonl commented Dec 23, 2024

Description of the issue

We want the ability to send entities for customers forwarding EMF logs using the EMF forwarding plugin: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format_Generation_CloudWatch_Agent.html

To do this, we should add the awsentity processor which contains logic providing entity attributes to cloudwatch exporters.

Description of changes

  • Add awsentity processor to EMF log pipeline.

Note that this change does not change the telemetry yet, it just sets up the pipeline for future modifications.

License

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

Tests

Unit test.

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

@zhihonl zhihonl requested a review from a team as a code owner December 23, 2024 19:29
@@ -110,6 +111,10 @@ func newAwsEntityProcessor(config *Config, logger *zap.Logger) *awsEntityProcess
}
}

func (p *awsEntityProcessor) processLogs(_ context.Context, ld plog.Logs) (plog.Logs, error) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This function is a no-op for now since this PR is focused on adding awsentity processor to the pipeline. Will be expanded in later PRs to add entity attributes for log pipelines

@@ -26,7 +26,9 @@ func NewFactory() processor.Factory {
return processor.NewFactory(
TypeStr,
createDefaultConfig,
processor.WithMetrics(createMetricsProcessor, stability))
processor.WithMetrics(createMetricsProcessor, stability),
processor.WithLogs(createLogsProcessor, stability),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added these in factory code so awsentity can be added as a log type processor but it doesn't really do anything now

@zhihonl zhihonl changed the title Add awsentity processor into EMF pipeline [Explore Related] Add awsentity processor into EMF pipeline Dec 24, 2024
@zhihonl zhihonl changed the title [Explore Related] Add awsentity processor into EMF pipeline [awsentity] Add awsentity processor into EMF pipeline Dec 24, 2024
@zhihonl zhihonl changed the title [awsentity] Add awsentity processor into EMF pipeline [processor/awsentity] Add awsentity processor into EMF pipeline Dec 24, 2024
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