Coder Social home page Coder Social logo

Comments (7)

brian-brazil avatar brian-brazil commented on July 17, 2024

Are you doing anything that'd make /proc inaccessible?

from client_python.

hynek avatar hynek commented on July 17, 2024

Not that I’d know of.

They’re run using runit and inside envconsul. The latter is the only recent change I can think of. Other than that, it’s regular processes in an LXC container with a distinct user.

Are you saying that /proc problems are the only possible reason why those metrics might be missing?

from client_python.

brian-brazil avatar brian-brazil commented on July 17, 2024

With the current implementation, yes. We read from /proc/self/stat.

from client_python.

hynek avatar hynek commented on July 17, 2024

I've added a

with open("/proc/self/stat", "rb") as f:
    print(f.read())¬

block to the app's startup and before calling generate_latest(core.REGISTRY) and in both cases I get a legit-looking output back.

I suppose it's too late at that point anyway because something goes wrong write registering metrics?

from client_python.

hynek avatar hynek commented on July 17, 2024

OK it was /proc but not the self thing (free -m stopped working too). Seems like procfs crashed and I needed to reboot the container.

It may be nice if the docs mentioned this error case? Or a log message a la “could not access XYZ, process metrics won't be collected”?

from client_python.

brian-brazil avatar brian-brazil commented on July 17, 2024

I don't think we need to document that if kernel is hosed things will break. We don't log as that could get spammy in other circumstances.

from client_python.

hynek avatar hynek commented on July 17, 2024

OK. Maybe if someone runs into it, they find this ticket. :)

from client_python.

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.