Giter VIP home page Giter VIP logo

Comments (7)

matttproud avatar matttproud commented on June 15, 2024

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.

juliusv avatar juliusv commented on June 15, 2024

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.

matttproud avatar matttproud commented on June 15, 2024

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.

juliusv avatar juliusv commented on June 15, 2024

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.

matttproud avatar matttproud commented on June 15, 2024

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.

beorn7 avatar beorn7 commented on June 15, 2024

@juliusv Is that still an issue?

from client_golang.

juliusv avatar juliusv commented on June 15, 2024

This has been resolved via a series of MergeLabelIngesters in the Prometheus server.

from client_golang.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.