Comments (7)
Oof. Just thinking about this, said functionality ought not to be in the
client library at all and be done by the consumer of it. As it stands now,
this is business logic creep. I would make a pull to remove it from the
client and add it back to the Prometheus server.
Am 07.08.2013 20:14 schrieb "juliusv" [email protected]:
AFAICS the new protobuf-based extraction processor simply overwrites the
target's base labels on a sample if the target sets a conflicting label
itself:https://github.com/prometheus/client_golang/blob/master/extraction/metricfamilyprocessor.go#L76
...whereas the JSON-based processors avoid such collisions by adding an
exporter_ prefix to the conflicting target labels (as specified in
https://github.com/prometheus/prometheus/wiki/Automatic-Labels-and-Synthetic-Metrics):https://github.com/prometheus/client_golang/blob/master/extraction/processor0_0_2.go#L71
This should probably be fixed for the protobuf processor as well.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/24
.
from client_golang.
Yeah, this was from the time when this batch of code was still part of the server, not the client library. I'm happy to move it out along with the other label changes.
from client_golang.
Please do.
Am 07.08.2013 22:13 schrieb "juliusv" [email protected]:
Yeah, this was from the time when this batch of code was still part of the
server, not the client library. I'm happy to move it out along with the
other label changes.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-22280298
.
from client_golang.
I'm changing my opinion on this. The processor feeds samples back into its results channel, which circumvents any subsequent code in Prometheus' retrieval layer and ends up directly in storage. This is so we can take advantage of parallelism in the scrape->storage pipeline. If we wanted to make any targetlabel-based modifications to the result samples before they end up in the storage layer, we'd need to spin up another dispatcher in Prometheus' retrieval layer which reads from one result channel, rewrites results, and writes to a second channel which feeds the final results to storage. I have a feeling that we'd prefer merging the labels in the processing layer than introducing this kind of extra complexity?
from client_golang.
I have a refactoring that will interest you that will obviate this
concern. Let me post it for you once back from Sverige.
Am 08.08.2013 12:39 schrieb "juliusv" [email protected]:
I'm changing my opinion on this. The processor feeds samples back into its
results channel, which circumvents any subsequent code in Prometheus'
retrieval layer and ends up directly in storage. This is so we can take
advantage of parallelism in the scrape->storage pipeline. If we wanted to
make any targetlabel-based modifications to the result samples before they
end up in the storage layer, we'd need to spin up another dispatcher in
Prometheus' retrieval layer which reads from one result channel, rewrites
results, and writes to a second channel which feeds the final results to
storage. I have a feeling that we'd prefer merging the labels in the
processing layer than introducing this kind of extra complexity?—
Reply to this email directly or view it on GitHubhttps://github.com//issues/24#issuecomment-22315378
.
from client_golang.
@juliusv Is that still an issue?
from client_golang.
This has been resolved via a series of MergeLabelIngester
s in the Prometheus server.
from client_golang.
Related Issues (20)
- Locally reproducible CI/CD HOT 7
- [CI]: Add Concurrency Grouping to GitHub Workflows HOT 2
- API Mocks HOT 6
- Support the SetWriteDeadline and SetReadDeadline interfaces
- Prometheus exp. format: Detect and sort series with label values containing numbers numerically not lexicographically HOT 2
- Build break after updating HOT 6
- Client model `metrics.pb.go` init function is ruining benchmarks
- Q: Are you going to release a new version anytime soon? HOT 4
- promlint: Refine lintMetricTypeInName
- Is the godoc for MetricVec.GetMetricWithLabelValues() wrong? HOT 3
- Propose to add GetMetricWithLabelvaluesIfExist fuction to XXXVec struct HOT 2
- A potential goroutine memory leak HOT 1
- Consider support for testing exemplars in prometheus/testutil HOT 4
- The latest version of the package provides methods that are not compatible with version 1.12 HOT 1
- Remove go-spew dependency HOT 2
- Document the bridge that allows for client_golang instrumented code to push with OpenTelemetry OTLP HOT 3
- go_memstats_gc_cpu_fraction HOT 3
- Configure security vuln dependabot automation for latest image.
- Client_golang Website HOT 2
- Ability to set CreatedTimestamp on constant histogram metrics HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from client_golang.