Introduction

edit

ECS logging are integrations for your favorite .NET logging libraries. They make it easy to format your logs into ECS-compatible JSON.

Want to learn more about ECS, ECS logging, and other available language plugins? See the ECS logging overview.

The .NET ECS libraries fall into several categories:

Model

edit

At its core all .NET ECS libraries are powered by Elastic.CommonSchema which strongly types the ECS specification to .NET classes.

This library can be used to map your events to ECS in a typesafe fashion.

var doc = EcsDocument.CreateNewWithDefaults<EcsDocument>();
doc = new EcsDocument();

Lean more about Elastic.CommonSchema.

Log Formatters

edit

Our log formatters allow you to change the way various logging frameworks log to IO (file/console) to use ECS json.

Data Shippers

edit

Our datashippers integrate with logging frameworks to facilitate sending events (logs) to various off Elastic receivers.

Currently these shippers support Elastic Cloud & Elasticsearch but other outputs are in the works.

All the data shippers utilize Elastic.Ingest.Elasticsearch.CommonSchema to send events to Elasticsearch.

Enrichers

edit

Enrichers can be installed next to Log Formatters and Data Shippers to automatically enrich the ECS json that gets produced.

Architecture

edit

The libraries reuse the same components that power other .NET libraries from Elastic—​ensuring a common way to both configure and monitor Elastic’s .NET libraries.

ECS.NET Artichtecture overview

At its core all data shippers depend on Elastic.Transport to coordinate HttpRequests. This library is also the heart of Elastic’s clients and ensures we share best practices and configuration options.

The data shipper libraries all depend upon the push based ingestion abstractions from Elastic.Ingest.* that presents an easy to use System.Threading.Channels backed method to push events as batches at variable rates to external datasources.

Lean more about Elastic.Ingest.Elasticsearch.CommonSchema.