Git Product home page Git Product logo

Comments (5)

stoader avatar stoader commented on June 1, 2024

Have you considered using metrics namespaces (spark.metrics.namespace)?

If you have a PR please let me know and we'll review it.

from spark-metrics.

dahiyahimanshu avatar dahiyahimanshu commented on June 1, 2024

I am interested whenever my spark app crash it restart with new job name timestamp appended. I don`t know how i can clean up stale groups from pushgateway.
pushgateway

from spark-metrics.

stoader avatar stoader commented on June 1, 2024

@dahiyahimanshu pushgateway doesn't support adding a TTL to metrics (see prometheus/pushgateway#117) thus it keeps the received metrics until pushgateway is either restarted or not needed metrics are removed manually. Metrics can be removed either through the UI or using curl (see https://github.com/prometheus/pushgateway for examples)

from spark-metrics.

Matzz avatar Matzz commented on June 1, 2024

I think overriding just spark.metrics.namespace (job name) wont help here. I think common groupingKey is also required. However it is not possible to override it now:

      val groupingKey: Map[String, String] = (role, executorId) match {
        case ("driver", _) =>
          labelsMap match {
            case Some(m) => Map("role" -> role, "app_name" -> appName, "instance" -> instance) ++ m
            case _ => Map("role" -> role, "app_name" -> appName, "instance" -> instance)
          }

        case ("executor", Some(id)) =>
          labelsMap match {
            case Some(m) =>
              Map ("role" -> role,
                "number" -> id,
                "app_name" -> appName,
                "instance" -> instance) ++ m
            case _ =>
              Map ("role" -> role,
              "number" -> id,
              "app_name" -> appName,
              "instance" -> instance)
          }

        case _ => Map("role" -> role)
      }

from spark-metrics.

Matzz avatar Matzz commented on June 1, 2024

I think this article touch that topic - https://www.robustperception.io/common-pitfalls-when-using-the-pushgateway

This is particularly evident with metrics containing an instance label (which should not be going to the Pushgateway in the first place, as they are not service-level).

from spark-metrics.

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.