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 helper.go and tests #5

Closed
wants to merge 70 commits into from
Closed

add helper.go and tests #5

wants to merge 70 commits into from

Conversation

huyan0
Copy link

@huyan0 huyan0 commented Aug 5, 2020

here is a link to the overall project design

helper.go contains helper functions used to convert OTLP metrics into TimeSeries. It has the following methods:

  • validateMetrics: returns a bool representing whether the metric has a valid type and temporality combination.

  • addSample: add a sample to its corresponding TimeSeries to the map based on a label set

  • createLabelSet: creates a slice of Cortex Label with OTLP labels and paris of string values.

  • getPromMetricName: creates a Prometheus metric name from OTLP metric

  • timeSeriesSignature: get a unique string signature for a OTLP metric

helper.go is used by cortex.go. PR #7 contains both files.

@huyan0 huyan0 closed this Aug 5, 2020
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.

1 participant