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

Use batches to call CreateTimeSeries #617

Merged
merged 3 commits into from
Mar 21, 2023
Merged

Use batches to call CreateTimeSeries #617

merged 3 commits into from
Mar 21, 2023

Conversation

knightpp
Copy link
Contributor

Based on #575 I've updated sending logic to batch time series data. The argument is hardcoded, and I couldn't find mocks for *monitoring.MetricClient so no tests.

@knightpp knightpp requested a review from a team as a code owner March 20, 2023 08:25
@google-cla
Copy link

google-cla bot commented Mar 20, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@damemi damemi self-assigned this Mar 20, 2023
@damemi
Copy link
Contributor

damemi commented Mar 20, 2023

Hi @knightpp, thanks for opening this, just need to you to sign the CLA (see the bot comment)

@knightpp
Copy link
Contributor Author

knightpp commented Mar 20, 2023

just need to you to sign the CLA (see the bot comment)

Hi, I've signed the CLA. There's a checkmark on the PR. Thanks.

@damemi
Copy link
Contributor

damemi commented Mar 20, 2023

Ah sorry, I see it now.
/gcbrun

@codecov
Copy link

codecov bot commented Mar 20, 2023

Codecov Report

Merging #617 (1ad1548) into main (e9bb597) will increase coverage by 0.17%.
The diff coverage is 75.00%.

❗ Current head 1ad1548 differs from pull request most recent head b0aeddc. Consider uploading reports for the commit b0aeddc to get more accurate results

@@            Coverage Diff             @@
##             main     #617      +/-   ##
==========================================
+ Coverage   63.27%   63.44%   +0.17%     
==========================================
  Files          38       38              
  Lines        4446     4423      -23     
==========================================
- Hits         2813     2806       -7     
+ Misses       1508     1491      -17     
- Partials      125      126       +1     
Impacted Files Coverage Δ
exporter/metric/metric.go 70.64% <75.00%> (-0.44%) ⬇️

... and 6 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@damemi damemi left a comment

Choose a reason for hiding this comment

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

looks good, one nit and can you add a test too? The test might be easier if you make batchSize a configurable (private) field on the exporter, eg so you can run a test with a max batch size of like 1 or 2 instead of having to create 200+ test metrics

exporter/metric/metric.go Outdated Show resolved Hide resolved
@damemi damemi closed this Mar 20, 2023
@damemi damemi reopened this Mar 20, 2023
@damemi
Copy link
Contributor

damemi commented Mar 20, 2023

/gcbrun

@knightpp
Copy link
Contributor Author

can you add a test too?

Added tests and refactored exportTimeSeries.

@damemi
Copy link
Contributor

damemi commented Mar 21, 2023

/gcbrun

@damemi damemi merged commit 9c6bb10 into GoogleCloudPlatform:main Mar 21, 2023
DP19 pushed a commit to pendo-io/opentelemetry-operations-go that referenced this pull request Dec 19, 2023
* Use batches for call to CreateTimeSeries

* Refactor exportTimeSeries

* Add tests
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.

2 participants