Search code examples
loggingazure-service-fabric

View Logs in Azure Service Fabric with SF CLI (sfctl)


I am new to Azure Service Fabric and C# and I'm looking for an equivalent to "kubectl logs -f" in sfctl. Is there any other way to view the stdout log of a service?


Solution

  • It's not as easy as with Kubernetes, but the recommended approach is:

    1. Application monitoring with Application Insights
    2. Cluster monitoring with Diagnostics Agent and Azure Monitor logs
    3. Infrastructure monitoring with Azure Monitor logs

    In your case, you'd use App Insights to see Service traces and logs. Make sure to enable 'developer mode' locally, to decrease the time it takes for logs to show up.