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

example/metric : Add exponential_histogram README and reorganize folders. #821

Merged
merged 15 commits into from
Mar 26, 2024

Conversation

franciscovalentecastro
Copy link
Contributor

Closes #804

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.03%. Comparing base (2be0414) to head (aadd0dc).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #821      +/-   ##
==========================================
+ Coverage   60.00%   61.03%   +1.02%     
==========================================
  Files          56       56              
  Lines        5896     5902       +6     
==========================================
+ Hits         3538     3602      +64     
+ Misses       2206     2143      -63     
- Partials      152      157       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

@franciscovalentecastro I see this is a draft but just curious, why move the existing examples into a new export folder? Couldn't the exponential_histogram example folder just go under the existing examples directory with them?

@franciscovalentecastro franciscovalentecastro marked this pull request as ready for review March 21, 2024 16:41
@franciscovalentecastro franciscovalentecastro requested a review from a team as a code owner March 21, 2024 16:41
@franciscovalentecastro franciscovalentecastro changed the title [Draft] example/metric : Add exponential_histogram README and reorganize folders. example/metric : Add exponential_histogram README and reorganize folders. Mar 21, 2024
@franciscovalentecastro
Copy link
Contributor Author

franciscovalentecastro commented Mar 21, 2024

@franciscovalentecastro I see this is a draft but just curious, why move the existing examples into a new export folder? Couldn't the exponential_histogram example folder just go under the existing examples directory with them?

Re @damemi, I was writing a README.md for the exponential_histogram with the realization that most steps were very similar to what the other examples (collector, otlpgrpc, spk) require to run. There were two options :

  1. Add all steps to run exponential_histogram within the already existing example/metric/README and be sure to clarify the different paths and details. For example, now we would have multiple dashboard.json files (one for sdk and one for exponential_histogram), so create_dashboard.sh needs a parameter and reorganize the files (rename). Also, reorganize the descriptions to have an holistic description of the examples in the folder (this seems best in the long term now giving more thought to it).

  2. Create another folder exponential_histogram with a new self contained README and steps like i did in the current state of the PR.

I don't have any strong opinion between options 1. or 2.. I chose 2. initially for this draft for simplicity. I could do 1. too. WDYT @damemi ?

@dashpole
Copy link
Contributor

I'll let @damemi do this review

@damemi
Copy link
Contributor

damemi commented Mar 21, 2024

@franciscovalentecastro ah I see. What if we add a new dashboards folder in example/metric and put just the dashboard.json files in there.

Then copy create_dashboard.sh to each example that uses it, and modify the command to point to the right dashboard file (ie ../dashboards/export.json or ../dashboards/exponential_histogram.json). Then the README is the same for each example.

The only difference is the chart image, but you could add a small README to each example that just shows the final chart image.

My reasoning behind this is that the sdk and collector examples aren't really grouped as one (they're intentionally separate examples, they just share the same metric names). otlpgrpc is also its own example, and this one doesn't seem like it needs to be organized on its own either.

@damemi
Copy link
Contributor

damemi commented Mar 25, 2024

@franciscovalentecastro could you please update the package in
exponential_histogram/go.mod? it conflicts with the sdk path

@franciscovalentecastro
Copy link
Contributor Author

franciscovalentecastro commented Mar 25, 2024

Re @damemi :

What if we add a new dashboards folder in example/metric and put just the dashboard.json files in there.

Thanks for the review and guidance. I agree with all comments. I addressed all requested changes.

could you please update the package in exponential_histogram/go.mod? it conflicts with the sdk path

Fixed.

More Details

  • Improved the flow of instructions with the example sub-directory README's.
  • Removed the built metrics binary.

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.

@damemi damemi merged commit 71d9493 into GoogleCloudPlatform:main Mar 26, 2024
32 checks passed
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.

README for exponential histogram example
3 participants