Giter Club home page Giter Club logo

Comments (3)

RustedBones avatar RustedBones commented on May 20, 2024

Hi @wake42.
That's a great suggestion. Just in time for v1.0.0. I'm adding this to the milestone

from akka-http-metrics.

wake42 avatar wake42 commented on May 20, 2024

Hi,
Thanks for this, it works really well, but we have a problem. OPTIONS is also a method, but that one is not handled with path (pathLabeled) in Akka so right now all OPTIONS register with full path including any id:s (OPTIONS /user/1 becomes a different metric from /user/2). I tried to add a path for OPTIONS but it seems that our cors handling is responding before we get to the routes.
Do you have any good idea of how to handle this.
We would be fine with dropping all OPTIONS calls from the metrics.

from akka-http-metrics.

RustedBones avatar RustedBones commented on May 20, 2024

Thanks for coming back on this issue. I suppose you are using akka-http-cors. The issue comes form this line.

Basically, when developing akka-http-metrics I made the wrong assumption that success responses are created when path is fully matched. This is not the case.

There are 2 possible solutions:

  • Have a custom RequestContext that can tell on complete how much of the path was matched
  • Have the path labelled as opt-in

In both cases this is not related to the http method. I'm closing this issue and will reference it in a new dedicated one.

from akka-http-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.