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

feat: implement storage for OTLP histogram #2282

Merged
merged 10 commits into from
Sep 23, 2023

Conversation

sunng87
Copy link
Member

@sunng87 sunng87 commented Aug 29, 2023

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

This patch adds OTLP histogram data type support, which was left blank in our initial release.

The implementation has been following Prometheus histogram table format:

  • A %metric%_bucket table including le tag that stores bucket upper limit, and greptime_value for bucket count
  • A %metric%_sum table storing sum of samples
  • A %metric%_count table storing count of samples.

By its Prometheus compatibility, we hope to be able to use prometheus quantile functions on this table.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

@sunng87 sunng87 requested a review from yuanbohan August 30, 2023 02:19
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Merging #2282 (c609f33) into develop (aef9e7b) will decrease coverage by 0.29%.
The diff coverage is 95.61%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2282      +/-   ##
===========================================
- Coverage    84.88%   84.60%   -0.29%     
===========================================
  Files          725      725              
  Lines       115186   115421     +235     
===========================================
- Hits         97780    97648     -132     
- Misses       17406    17773     +367     

@yuanbohan
Copy link
Contributor

@sunng87 sunng87 force-pushed the feature/otlp-histogram-2 branch from 46ccf4d to 7f1475a Compare September 20, 2023 06:16
@sunng87 sunng87 force-pushed the feature/otlp-histogram-2 branch from 1910ea0 to 9010120 Compare September 22, 2023 07:41
@sunng87
Copy link
Member Author

sunng87 commented Sep 22, 2023

Updated. PTAL @yuanbohan @fengjiachun @waynexia

@sunng87 sunng87 force-pushed the feature/otlp-histogram-2 branch from 6e16e83 to c609f33 Compare September 22, 2023 09:05
Copy link
Collaborator

@fengjiachun fengjiachun left a comment

Choose a reason for hiding this comment

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

LGTM

@fengjiachun fengjiachun added this pull request to the merge queue Sep 23, 2023
Merged via the queue into GreptimeTeam:develop with commit ffa729c Sep 23, 2023
13 checks passed
@sunng87 sunng87 deleted the feature/otlp-histogram-2 branch September 25, 2023 01:49
paomian pushed a commit to paomian/greptimedb that referenced this pull request Oct 19, 2023
* feat: implement new histogram data model

* feat:  use prometheus table format for histogram

* refactor: remove duplicated code

* fix: histogram tag column

* fix: use accumulated count in buckets

* refactor: using row based protocol for otlp WIP

* refactor: use row based writer for otlp.

Also updated row writer for owned keys

* refactor: use row writers for otlp

* test: add integration tests for histogram

* refactor: change le column name
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.

3 participants