Comments (2)
Thanks very much Nick, you validated what I was thinking. Looks like I'll have to start simplifying some of these log statements.
from serilog-sinks-elasticsearch.
Hi Brent,
I can't answer the ELK questions, but regarding the first part of 1), no, that's not really the design intention for Serilog.
It can be done, but the goal for Serilog's object graph serialization is to improve the machine readability of log events with interesting data that you'd otherwise normally format into unstructured text, not to capture large/complex object graphs.
As a rule of thumb - if you'd bother converting the data to some string format for inclusion in a traditional text log, then Serilog should handle recording that same data in structured form.
So, say, if the code records a user login and we want to log the username as well as the internal id of the user, then logging a structured User
property with Name
and Id
seems fine to me. Likewise if we're starting up and want to log the list of configuration servers we're about to probe, then Servers
structured as s list of hostnames is great. In these cases I'd historically have written the same data out to the log just by formatting it into the message, and Serilog makes the event more useful by preserving the structure.
As a counterexample, I haven't worked with many systems where it's been desirable log e.g. entire messages from a service bus, or entire web requests from clients, except in perhaps the most extreme, all-else-has-failed debugging scenario. Pumping these kinds of things out into a text log would be pretty commonly recognised as a questionable practice I think. Serilog's not much different here - the purpose of the log and the natural limitations WRT event size and so-on remain, even though the format is more modern.
Hope I've understood your question correctly and not just hit you with a wall of text :-O ... hope this helps! :-)
Nick
from serilog-sinks-elasticsearch.
Related Issues (20)
- v. 9.0.0 - ElasticsearchClientException: Could not authenticate with the specified node HOT 1
- Add autogenerated template IndexAliases configuration properties HOT 2
- Possible clock issue?
- The ES7 template registration throw an exception HOT 1
- New version 9.0.3 doesn't work with Logstash HOT 1
- The client noticed that the server is not a supported distribution of Elasticsearch. HOT 1
- 9.0.3 did not bring in changes from 9.0.2 HOT 2
- Unable to connect and write logs to Elasticsearch v8.8.1 HOT 3
- Unable to upload logs to Elastic Search Cloud HOT 1
- Unable to send logs to OpenTelemetry backend (using Serilog in .Net framework 4.8)
- How can i add a custom Id to es with Serilog.Sinks.Elasticsearch
- Support the new TraceId and SpanId in Serilog HOT 1
- Add Support for OpenSearch.
- How do I update Dotnet Serilog Logging Config to Deal with new Elastic 8 security (https, username, password, tls cert)? HOT 1
- Enable configuration of IndexDecider also from a config file
- serilog.sinks.elasticsearch is missing NuGet package README file
- Not Load Type
- Serilog.Sinks.Elasticsearch 10.0.0 don't works with Serilog.Sinks.MariaDB 1.0.1
- Future of this sink HOT 2
- Serilog.Sinks.Elasticsearch 10.0.0 don't works with Serilog.Sinks.OpenSearch 1.0.0
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 serilog-sinks-elasticsearch.