Git Product home page Git Product logo

Comments (7)

RustedBones avatar RustedBones commented on June 14, 2024

I tried to reproduce but the code compiles without issue on my setup.
recordMetrics is found on Route.
Do you have a all required implicits in scope (Materializer, ...) ?

Can you maybe share you server setup to help for investigation ?

from akka-http-metrics.

RustedBones avatar RustedBones commented on June 14, 2024

@philvarner Any news on this ?

from akka-http-metrics.

philvarner avatar philvarner commented on June 14, 2024

Sorry for not getting back with you. I created a minimal reproduction here: https://github.com/philvarner/metrics-bug
with the same issu:

[info] Compiling 1 Scala source to /Users/pvarner/code/metrics-bug/target/scala-2.12/classes ...
[error] /Users/pvarner/code/metrics-bug/src/main/scala/foo/StandardHttpService.scala:38:11: value recordMetrics is not a member of akka.http.scaladsl.server.Route
[error]     route.recordMetrics(metricsRegistry, metricsSettings)
[error]           ^

from akka-http-metrics.

RustedBones avatar RustedBones commented on June 14, 2024

It's confusing...

image

I tried to clear the ivy/coursier cache to make sure I don't run in a locally published version of the library

from akka-http-metrics.

philvarner avatar philvarner commented on June 14, 2024

Sorry, I accidentally discovered how to make it work before committing that code. I've pushed the changes to make it break. It seems to only be an issue when it's in the companion object's apply method -- when I rename that method to f1 like in original code, it works. Why that would be is beyond my Scala knowledge.

from akka-http-metrics.

philvarner avatar philvarner commented on June 14, 2024

I'm not even sure why this is code is designed as an object in the first place. Maybe just documenting that this doesn't work as a naive user might expect in an object is a good resolution.

from akka-http-metrics.

RustedBones avatar RustedBones commented on June 14, 2024

Maybe just documenting that this doesn't work

It compiled without problem on a clean clone with clean cache

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.