Giter VIP home page Giter VIP logo

Comments (15)

jviau avatar jviau commented on July 21, 2024 2

@kAleksei thank you, that is helpful to understand your scenario. I am familiar with k8s log pattern like this and sounds like a solid reason for us to evaluate supporting this. Unfortunately, it won't be possible now. But we have been discussing sweeping improvements for observability in Azure Functions and this can be considered as a part of it. There is no ETA on that and the work has not been started yet.

from azure-functions-dotnet-worker.

kAleksei avatar kAleksei commented on July 21, 2024 1

Hey, any comments on this?

from azure-functions-dotnet-worker.

dalibormesaric avatar dalibormesaric commented on July 21, 2024

We ended up filtering this out at promtail level, but that does not feel right.

from azure-functions-dotnet-worker.

kAleksei avatar kAleksei commented on July 21, 2024

It will not work for me, because I don't use application insights, but read logs from stdout.

from azure-functions-dotnet-worker.

jviau avatar jviau commented on July 21, 2024

To explain what is going on, standard out is piped to the host process and then it is written to the console. This is where that extra info: Host.Function.Console[0] comes from. No immediate plans to change that behavior, but we are looking into improving our logging abilities and may consider a change for this in the future.

from azure-functions-dotnet-worker.

dalibormesaric avatar dalibormesaric commented on July 21, 2024

Thanks for answering @jviau ! And just to clarify, we as developers have no control over this, and the only way to remove it is in our log scaping tool (promtail in my case)?

from azure-functions-dotnet-worker.

kAleksei avatar kAleksei commented on July 21, 2024

@jviau, it would be nice if this could be prioritized because we are writing the logs in JSON format single line. And every line is a separate log entry. Therefore every log that we want to write multiplies by two as functions host logs category and line breaks. As a result, logging costs are twice as high.

from azure-functions-dotnet-worker.

jviau avatar jviau commented on July 21, 2024

@dalibormesaric correct there is no control over this at the moment. The worker process is created as a child of the host process and as part of that the stdout is redirected to the host process.

@kAleksei we have no concrete plans to address this at the moment. Is using stdout your only option? Can you add a custom ILoggerProvider and ILogger which outputs to some other handle or stream?

from azure-functions-dotnet-worker.

kAleksei avatar kAleksei commented on July 21, 2024

@jviau unfortunately, this is only the option to log into stdout.

from azure-functions-dotnet-worker.

jviau avatar jviau commented on July 21, 2024

Can you help me understand your scenario a bit more? Why is it important to log to stdout? What system are you using which relies on stdout?

from azure-functions-dotnet-worker.

kAleksei avatar kAleksei commented on July 21, 2024

@jviau, we are deploying the azure functions isolated to k8s cluster. In the cluster, we have installed an agent, which is responsible for pulling logs from stdout of the container. So more than 1k different services are using this approach.
We are using datadog agent for gathering the logs. Here are the docs how it actually works: https://docs.datadoghq.com/containers/kubernetes/log/?tab=operator

from azure-functions-dotnet-worker.

kAleksei avatar kAleksei commented on July 21, 2024

@jviau, I appreciate your understanding. If you require any further information, please don't hesitate to ask. Additionally, I am eagerly awaiting updates on this item, as this feature holds a high level of importance for us.

from azure-functions-dotnet-worker.

domingosliraneto avatar domingosliraneto commented on July 21, 2024

@jviau I believe I have a problem related to the topic. In my case, I cannot remove the datetime stamp in front of the json, this ends up impacting elastic collection, which only accepts files in json format.

image

from azure-functions-dotnet-worker.

kAleksei avatar kAleksei commented on July 21, 2024

@domingosliraneto, did you have a chance to run your functions without IDE (like Visual Studio tools) and azure-functions-core-tools? For instance in docker container. Looks like this output formatted and written to console with debugging tools.

from azure-functions-dotnet-worker.

brunomoura-dev avatar brunomoura-dev commented on July 21, 2024

, você teve a chance de executar suas funções sem IDE (como ferramentas do Visual Studio) e ? Por exemplo, no contêiner docker. Parece que esta saída formatada e gravada no console com ferramentas de depuração.azure-functions-core-tools

Yes, I tested it in a container and the effect is the same as shown by @domingosliraneto

image

Remember, in the structured log configuration, dates are not defined. The same pattern is even used in other worker applications, for example.

from azure-functions-dotnet-worker.

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.