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

Add the ability to batch metrics as a processor. #1060

Merged

Conversation

ccaraman
Copy link
Contributor

@ccaraman ccaraman commented Jun 1, 2020

Description: Add the ability to batch metrics as a processor.

Link to tracking Issue: N/A

Testing: Added test for batching of metrics

Documentation: Updated the docs.

@codecov
Copy link

codecov bot commented Jun 1, 2020

Codecov Report

Merging #1060 into master will increase coverage by 0.07%.
The diff coverage is 96.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1060      +/-   ##
==========================================
+ Coverage   86.33%   86.41%   +0.07%     
==========================================
  Files         199      199              
  Lines       14072    14153      +81     
==========================================
+ Hits        12149    12230      +81     
- Misses       1461     1463       +2     
+ Partials      462      460       -2     
Impacted Files Coverage Δ
processor/batchprocessor/batch_processor.go 97.16% <96.19%> (+3.04%) ⬆️
internal/data/testdata/metric.go 100.00% <100.00%> (ø)
processor/batchprocessor/factory.go 100.00% <100.00%> (ø)
translator/internaldata/resource_to_oc.go 73.52% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c3125a...6215118. Read the comment docs.

@bogdandrutu bogdandrutu changed the title Feature/ccaraman/batch metrics Add the ability to batch metrics as a processor. Jun 1, 2020
//
// Batches are sent out with any of the following conditions:
// - batch size reaches cfg.SendBatchSize
// - cfg.Timeout is elapsed since the timestamp when the previous batch was sent out.
// - cfg.Timeout is elapsed since the timestamp when the previous batchTraces was sent out.
Copy link
Member

Choose a reason for hiding this comment

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

s/batchTraces/batch?

}

func (bp *batchMetricProcessor) GetCapabilities() component.ProcessorCapabilities {
return component.ProcessorCapabilities{MutatesConsumedData: true}
Copy link
Member

Choose a reason for hiding this comment

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

Please add an issue to discuss if this is needed. Not sure if we "mutate" data.

@bogdandrutu
Copy link
Member

@ccaraman please also ensure that the diff coverage is over the limit :)

@tigrannajaryan tigrannajaryan added this to In progress in Collector via automation Jun 2, 2020
Collector automation moved this from In progress to Reviewer approved Jun 2, 2020
@bogdandrutu bogdandrutu merged commit 4074b3c into open-telemetry:master Jun 2, 2020
Collector automation moved this from Reviewer approved to Done Jun 2, 2020
@flands flands added this to the Beta 0.4 milestone Jun 4, 2020
wyTrivail pushed a commit to mxiamxia/opentelemetry-collector that referenced this pull request Jul 13, 2020
* Add batching for metrics

* Update documentation

* Improve test coverage
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this pull request Nov 11, 2021
…#1060)

* Move `api/label` to `label`

* Move `api/kv` package contents into `label` package

* Unify label package name

* Move `api/internal/rawhelpers.go` to `internal`

* Propagate replacing `api/kv` with `label` pkg

* golint

* Fix over-aggressive change

* Update Changelog
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this pull request Apr 27, 2023
…y#1060)

Bumps [boto3](https://github.com/boto/boto3) from 1.20.25 to 1.20.26.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.20.25...1.20.26)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Collector
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants