Coder Social home page Coder Social logo

Comments (10)

cf-gitbot avatar cf-gitbot commented on July 19, 2024

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/163084679

The labels on this github issue will be updated when the story is started.

from samples.

hananiel avatar hananiel commented on July 19, 2024

@nmarun sounds like your path (management:endpoints:path) is set to / (or perhaps not set). Look at https://steeltoe.io/docs/steeltoe-management/#1-2-usage and try setting this in your appsettings.json: management:endpoints:path=/cloudfoundryapplication.

from samples.

nmarun avatar nmarun commented on July 19, 2024

@hananiel thanks, yes it was missing, but that still didn't solve the problem.

I'm seeing these two lines in the output window in VS:
[09-01-2019 14:33:13 dbug Instance Index: 0] : Invoke(/)
[09-01-2019 14:33:13 dbug Instance Index: 0] : Returning: {"type":"steeltoe","_links":{"self":{"href":"http://localhost:54885/"},"dump":{"href":"http://localhost:54885//dump"},"heapdump":{"href":"http://localhost:54885//heapdump"},"info":{"href":"http://localhost:54885//info"},"health":{"href":"http://localhost:54885//health"},"loggers":{"href":"http://localhost:54885//loggers"},"trace":{"href":"http://localhost:54885//trace"},"mappings":{"href":"http://localhost:54885//mappings"}}}

Does that help in any way?

Also, I'm using IISExpress for local debugging.

from samples.

hananiel avatar hananiel commented on July 19, 2024

nmarun, can you confirm that your appsettings.json is in your application root, and it is set to "copy if new" and getting copied to bin folder. If that doesn't work, can you try commenting out
services.AddCloudFoundryActuators(Configuration); and app.UseCloudFoundryActuators(); Tracing will not work but your app should, allowing you to figure out issues. If that still doesn't work, can you share your project or a simplified project to take a look at. Also caveat that there are known issues with Serilog and dynamic loggers and the loggers actuator. But that is something after you fix this initial problem of app not running.

from samples.

nmarun avatar nmarun commented on July 19, 2024

@hananiel I had updated the management:endpoints:path in the wrong appsettings.json. So just adding that config in the correct file helped me get rid of the issue and now my app is working. One question still remains is that doesn't it show the trace id and span id while local debugging?

I did read a couple of articles which talked about Steeltoe-Serilog incompatibility. Isn't there any work around for that? Please let me know.

Arun

from samples.

hananiel avatar hananiel commented on July 19, 2024

@nmarun can you confirm that removing Serilog makes things work? I would recommend we test each component one by one and find what is breaking . Ex. Start with just actuators and verify trace functionality. And slowly add the other things. Also try increasing the log level and attach the logs so we can take a look.

from samples.

nmarun avatar nmarun commented on July 19, 2024

I created a simple application by following the steps in https://steeltoe.io/docs/steeltoe-management/#2-1-1-running-locally. This one doesn't have Serilog but when I deploy, it doesn't show my the trace id / span id details in PCF (or even local, if it should show there).

steeltoetest.zip

from samples.

hananiel avatar hananiel commented on July 19, 2024

@nmarun I looked at your solution. I am not sure how you are trying to view the traces but adding a zipkin trace exporter worked for me as how the sample works. Please take a look and see if this helps: https://github.com/hananiel/nmarun/commit/511ba80b627388f2bcb97a6fe02edd0442f70d95

from samples.

hananiel avatar hananiel commented on July 19, 2024

So two options to view traces locally :

  1. Add app.UseCloudFoundryActuators() and then you can see your traces here https://localhost:5001/cloudfoundryapplication/trace
  2. Add the UseZipkin Exporter and view the traces in zipkin

In Cloud Foundry, you can just add the app.UseCloudFoundryActuators with the path set to "/cloudfoundryapplication" and the traces window in apps manager should show you the traces,

from samples.

TimHess avatar TimHess commented on July 19, 2024

This issue has been dormant for months, I'm assuming you found a solution. Please re-open if you need further help with this problem

from samples.

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.