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
signalfxexporter: Update exclude_metrics option to use dpfilters.MetricFilter #1951
signalfxexporter: Update exclude_metrics option to use dpfilters.MetricFilter #1951
Conversation
cc @jrcamp |
Codecov Report
@@ Coverage Diff @@
## master #1951 +/- ##
==========================================
+ Coverage 89.15% 90.38% +1.22%
==========================================
Files 393 393
Lines 19329 19409 +80
==========================================
+ Hits 17233 17542 +309
+ Misses 1641 1405 -236
- Partials 455 462 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
e3d7f77
to
1e5a978
Compare
|
||
type dataPointFilter struct { | ||
metricFilter *stringFilter | ||
dimensionsFilter *dimensionsFilter |
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.
Are these pointers for performance reasons?
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.
Not really. I guess I just started out with them. Would you advocate for one vs the other?
9169c99
to
8e6ee68
Compare
c059d51
to
9bc9bc4
Compare
…icFilter This is breaking change to exclude_metrics config option. Now, it takes metric filters instead of just metric names.
9bc9bc4
to
803dbaf
Compare
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.
lgtm
dimension_key: dimension_val | ||
- metric_name: metric5 | ||
dimensions: | ||
dimension_key: [dimension_val1, dimension_val2] |
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.
This supports /regex/ and glob.* form too right? Should probably document/give examples those.
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.
That's a good point. Added a few examples.
Adds a `send_timestamps` option to the prometheus exporter to allow it to send scrape timestamps. By default, when scraping, Prometheus records data assuming that the presented sample is at the instant of the scrape. For data sources that cache the underlying information and do not refresh on scrape, this can lead to metric samples being recorded at the wrong timestamp. For ex, cadvisor caches for many seconds (4-20 in our experience), and so a sample taken "now" may actually be a sample from 20s ago. To handle this situation, the exposition format allows an exporter to advise the Prometheus server of the timestamp of the underlying scrape. OpenTelemetry is aware of the timestamp of the scrape. This change adds an option to have OpenTelemetry send the timestamps of underlying samples out with the Prometheus exporter. Visually, the image shows existing behavior prior to 9.45am and with `send_timestamps: true` set from 9.45am onwards. This is metrics for a job using a single CPU. ![image](https://user-images.githubusercontent.com/3196528/95892425-62fe5a00-0d3b-11eb-9023-af8e59652157.png) **Related issues:** google/cadvisor#2526 orijtech/prometheus-go-metrics-exporter#11 **Testing:** Test cases have been added. In addition, for e2e test, see screenshot from our environment above. **Documentation:** The `prometheusexporter` README has been updated.
Depends on #1950
Description: Update
exclude_metrics
config option to usedpfilters.MetricFilter
. This is breaking change to exclude_metrics config option. Now, it takes slice of metric filters instead of just metric names (slice of strings).Testing: Updated tests.
Documentation: Updated README.
Not included in this PR but subsequent changes I'm looking to make