- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 49
 
Begin modelling API for metrics #184
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
base: main
Are you sure you want to change the base?
Conversation
…ule as they, and the Meters need to know about each other
typo fix Co-authored-by: Josh Miller <notjoshmiller@gmail.com>
| = GaugeKind | ||
| | SumKind | ||
| { monotonic :: Monotonicity | ||
| , aggregation :: AggregationTemporality | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's generally a bad practice to add field selectors to sum type constructors, and GHC even has a warning for it: https://downloads.haskell.org/ghc/latest/docs/users_guide/using-warnings.html#ghc-flag-Wpartial-fields
I would suggest moving these fields into separate records.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| 
           This needs documentation, at the very least comments that help me understand how to use these modules. Referencing the OTel spec would be great, but not necessary.  | 
    
| Version, | ||
| Meter, | ||
| Description, | ||
| UnitOfMeasure, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want to export the constructors for most of the types you've defined:
For example:
| UnitOfMeasure, | |
| UnitOfMeasure (..), | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| 
               | 
          ||
| module OpenTelemetry.Metric.Point ( | ||
| GaugePoint, | ||
| SumPoint, | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same feedback applies to this module (exports and docs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This is very rudimentary so far. Also currently only int64 values are supported for metrics.