Comments (15)
@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.
Hey, any comments on this?
from azure-functions-dotnet-worker.
We ended up filtering this out at promtail level, but that does not feel right.
from azure-functions-dotnet-worker.
It will not work for me, because I don't use application insights, but read logs from stdout.
from azure-functions-dotnet-worker.
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.
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.
@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.
@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.
@jviau unfortunately, this is only the option to log into stdout.
from azure-functions-dotnet-worker.
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.
@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.
@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.
@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.
from azure-functions-dotnet-worker.
@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.
, 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
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)
- Serverless signalR: Adding a user to a group and sending a message to the group simultaneously in upstream HOT 3
- Evaluate test coverage
- The target framework 'net8.0' must be 'net6.0'. Verify if target framework has been overridden by a global property. HOT 41
- .NET 8 Isolated Function - RpcExceptions and rogue "ProblemId" logs HOT 2
- How to read function parameter values from FunctionContext for middleware
- 'Stream' input/output support for azure Blob functions seems broken HOT 3
- TableInput for single entity returns array with all entities in that partition HOT 2
- [Docs] Add docs for new HTTP output binding HOT 2
- Middleware is not consistently writing the response when using ASP.Net Core Integration HOT 8
- Similar issue I am facing while upgrading to dotnetframework8 and using isolated function HOT 2
- Allow Middleware to alter Functions output for ServiceBus Message Binding HOT 3
- Add task in pipeline to deploy new throughput apps
- Throughput Testing Cleanup HOT 1
- Throughput Test Alerting
- BindInputAsync caches without regard to type, which leads to invalid cast later HOT 4
- SignalR extensions 1.13.0 Could not load file or assembly 'Microsoft.Extensions.Options, Version=7.0.0.0, HOT 2
- Enhancing Configuration Flexibility for Azure Functions Triggers
- .Net8 Isolated worker Service Bus Trigger "No Job functions found" error when deploying code to azure functions HOT 19
- Inject class-based SignalR ServerlessHub to other Azure Function classes HOT 2
- Function.deps.json references .NET 6 instead of .NET 8, causing security vulnerabilities to be flagged HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-functions-dotnet-worker.