Extend OTLP receiver to publish via EMF logs #1375
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
#1361 introduced the support for an OTLP plugin for publishing metrics via PutMetricData to CloudWatch.
This PR extends the ability to use the OTLP plugin to publish metrics as EMF logs via PutLogEvents to CloudWatch.
otlp
section underlogs -> metrics_collected
that can either be a json blob or an array of json blobs for multiple listeners.hostDeltaMetrics/cloudwatchlogs
pipeline using:otlpreceiver
- to receive the metrics on both HTTP and gRPC endpointscummulativetodelta
processor - to convert cumulatives to deltas by default when publishing to CloudWatchbatch
processor - to respect theforce_flush_interval
in thelogs
section of the agent configawsemfexporter
- to publish as EMF logs via PutLogEvents API calls to CloudWatchaws/cwagent
log group containing a log stream per unique run of the agent i.e. the log stream is based off a UUID generated on each run. Example log stream:otel-stream-52215dd6-abfa-44cb-a23d-25d79d1278fd
.CWAgent
namespace.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
Sample config:
Sample EMF log event:
Requirements
Before commit the code, please do the following steps.
make fmt
andmake fmt-sh
make lint