Git Product home page Git Product logo

Comments (3)

ivantopo avatar ivantopo commented on June 3, 2024 1

I think I mixed a couple concerns on this issue so I'm splitting it in two:

  • Fixing the particular bug of putting all 4xx status codes on the same bucket, addressed by #32 and will be released as 1.0.1 asap. Comment on the PR if there is anything weird.
  • Finding a solid solution to the cardinality issues, we will track that as #31. This is a much bigger goal and will definitely not be a quick one, please dump any additional feedback related to this into that issue.

from kamon-akka-http.

Falmarri avatar Falmarri commented on June 3, 2024

If you want to handle the not found specifically, you can specifically check for 404, i would be reasonably ok with that. Or you can inject higher into the DSL to look for rejected route with an empty rejection list (which indicates 404). Or keep track if the operation name is overridden or not and only set it if it is.

Another option is to set the operation name at the beginning to a sentinel (eg "root", which is what i use), and then before finishing, rename it with the path if the operation is still that sentinel value.

But regardless, you certainly need to let other 4xx be recorded as errors with their appropriate operation name

since the operation name is used as a metric tag and anything left out could lead to cardinality explosion

I think this is a flaw of the default generator imo.

have a rejection handler that will turn everything else into a unhandled operation

Perfectly fine with me. I'd like this to be either configurable or at least include the path as a tag. That's currently what I do

from kamon-akka-http.

n1ko-w1ll avatar n1ko-w1ll commented on June 3, 2024

In a ideal integration all routes recognized by the application will already have a stable name provided by either a name generator or the operationName directive.. maybe the best course of action would be to have a rejection handler that will turn everything else into a unhandled operation name and additionally be able to automatically add the status code as a metric tag via config option as @ptrlaszlo proposed.

I'm no expert with regards to Kamon or akka-http routes, this however sounds reasonable to me. In the end every solution is perfectly fine for me as long as I can measure how often a specific operation resulted in a 200 / 400 / 500 or whatever status code it might be.

from kamon-akka-http.

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.