Skip to content

update branch to main #172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ pipeline {
beforeAgent true
anyOf {
tag pattern: '\\d+\\.\\d+\\.\\d+(-(alpha|beta|rc)\\d*)?', comparator: 'REGEXP'
branch 'master'
branch 'main'
}
}
stages {
Expand All @@ -145,7 +145,7 @@ pipeline {
}
}
stage('Release to feedz.io') {
when { branch 'master' }
when { branch 'main' }
steps {
dir("${BASE_DIR}"){
deploy(secret: 'secret/apm-team/ci/elastic-observability-feedz.io')
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

# Elastic Common Schema .NET

[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-dotnet%2Fecs-dotnet-mbp%2Fmaster)](https://apm-ci.elastic.co/job/apm-agent-dotnet/job/ecs-dotnet-mbp/job/master/)
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=apm-agent-dotnet%2Fecs-dotnet-mbp%2Fmain)](https://apm-ci.elastic.co/job/apm-agent-dotnet/job/ecs-dotnet-mbp/job/main/)

This repository contains .NET integrations that use the Elastic Common Schema (ECS), including popular .NET logging frameworks. Read the [announcement post](https://www.elastic.co/blog/elastic-common-schema-dotnet-library-and-integrations-released-for-elasticsearch).

The Elastic Common Schema defines a common set of fields for ingesting data into Elasticsearch. A common schema helps you correlate data from sources like logs and metrics or IT operations analytics and security analytics. Further information on ECS can be found in the official [Elastic documentation](https://www.elastic.co/guide/en/ecs/current/index.html) or [github repository](https://github.com/elastic/ecs).

Contributions are welcome, please read our [guidelines](https://github.com/elastic/ecs-dotnet/tree/master/contributing.md).
Contributions are welcome, please read our [guidelines](https://github.com/elastic/ecs-dotnet/tree/main/contributing.md).

---

Expand Down Expand Up @@ -57,9 +57,9 @@ Official NuGet packages can be referenced from [NuGet.org](https://www.nuget.org

## Foundation Library

### [Elastic.CommonSchema](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.CommonSchema)
### [Elastic.CommonSchema](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.CommonSchema)

Foundational project that contains a full C# representation of ECS. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.CommonSchema)
Foundational project that contains a full C# representation of ECS. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.CommonSchema)

## Logging

Expand All @@ -82,19 +82,19 @@ using Elasticsearch.Extensions.Logging;
})
```

### [Elastic.CommonSchema.Serilog](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.CommonSchema.Serilog)
### [Elastic.CommonSchema.Serilog](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.CommonSchema.Serilog)

Formats a Serilog event into a JSON representation that adheres to the Elastic Common Schema. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.CommonSchema.Serilog)
Formats a Serilog event into a JSON representation that adheres to the Elastic Common Schema. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.CommonSchema.Serilog)

```csharp
var logger = new LoggerConfiguration()
.WriteTo.Console(new EcsTextFormatter())
.CreateLogger();
```

### [Elastic.CommonSchema.NLog](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.CommonSchema.NLog)
### [Elastic.CommonSchema.NLog](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.CommonSchema.NLog)

Formats an NLog event into a JSON representation that adheres to the Elastic Common Schema. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.CommonSchema.NLog)
Formats an NLog event into a JSON representation that adheres to the Elastic Common Schema. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.CommonSchema.NLog)

```csharp
Layout.Register<EcsLayout>("EcsLayout"); // Register the ECS layout.
Expand All @@ -107,9 +107,9 @@ var logger = LogManager.GetCurrentClassLogger();

## APM

### [Elastic.Apm.SerilogEnricher](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.Apm.SerilogEnricher)
### [Elastic.Apm.SerilogEnricher](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.Apm.SerilogEnricher)

Adds transaction id and trace id to every Serilog log message that is created during a transaction. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.Apm.SerilogEnricher)
Adds transaction id and trace id to every Serilog log message that is created during a transaction. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.Apm.SerilogEnricher)

```csharp
var logger = new LoggerConfiguration()
Expand All @@ -127,10 +127,10 @@ var logger = new LoggerConfiguration()
.CreateLogger();
```

### [Elastic.Apm.NLog](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.Apm.NLog)
### [Elastic.Apm.NLog](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.Apm.NLog)

Introduce two special place holder variables (`ElasticApmTraceId`, `ElasticApmTransactionId`) easily into your NLog templates.
[Learn more...](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.Apm.NLog)
[Learn more...](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.Apm.NLog)

```csharp
// Logged message will be in format of `trace-id|transation-id|InTransaction`
Expand All @@ -146,9 +146,9 @@ When using EcsLayout from `Elastic.CommonSchema.NLog` then trace and transaction

## Benchmarking

### [Elastic.CommonSchema.BenchmarkDotNetExporter](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.CommonSchema.BenchmarkDotNetExporter)
### [Elastic.CommonSchema.BenchmarkDotNetExporter](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.CommonSchema.BenchmarkDotNetExporter)

An exporter for [BenchmarkDotnet](https://github.com/dotnet/BenchmarkDotNet) that can index benchmarking result output directly into Elasticsearch. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.CommonSchema.BenchmarkDotNetExporter)
An exporter for [BenchmarkDotnet](https://github.com/dotnet/BenchmarkDotNet) that can index benchmarking result output directly into Elasticsearch. [Learn more...](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.CommonSchema.BenchmarkDotNetExporter)

```csharp
var options = new ElasticsearchBenchmarkExporterOptions(url)
Expand All @@ -171,4 +171,4 @@ BenchmarkRunner.Run(typeof(Md5VsSha256), config);

This software is Copyright (c) 2014-2020 by Elasticsearch BV.

This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/master/license.txt).
This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/main/license.txt).
2 changes: 1 addition & 1 deletion build/scripts/Targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ let private createReleaseOnGithub (arguments:ParseResults<Arguments>) =
let private updateLoggingSpec (arguments:ParseResults<Arguments>) =
let commit =
match arguments.TryGetResult Commit with
| None -> "master"
| None -> "main"
| Some commit -> commit
async {
use client = new HttpClient()
Expand Down
4 changes: 2 additions & 2 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ In those cases we tend to pull your code locally and write tests ourselves, but

Convention:

- `master` reflects the latest Elastic Common Schema (ECS) version, this is typically the `current latest major + 1`
- `main` reflects the latest Elastic Common Schema (ECS) version, this is typically the `current latest major + 1`
- `X.Y.Z` where `X` is the major version, `Y` is the minor component and `Z` is the patch component, typically opened as integration branch for a specific minor.

Examples:

- `master` for the latest ECS version
- `main` for the latest ECS version
- `1.2.0` for ECS 1.2.0 compatible integrations

# Building the solution
Expand Down
2 changes: 1 addition & 1 deletion src/Elastic.Apm.NLog/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ The prerequisite for this to work is a configured [Elastic APM Agent](https://gi

This software is Copyright (c) 2014-2020 by Elasticsearch BV.

This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/master/license.txt).
This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/main/license.txt).
2 changes: 1 addition & 1 deletion src/Elastic.Apm.SerilogEnricher/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ If the agent is not configured the enricher won't add anything to the logs.

This software is Copyright (c) 2014-2020 by Elasticsearch BV.

This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/master/license.txt).
This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/main/license.txt).
2 changes: 1 addition & 1 deletion src/Elastic.CommonSchema.BenchmarkDotNetExporter/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,4 @@ Example _source from a search in Elasticsearch after a benchmark run:

This software is Copyright (c) 2014-2020 by Elasticsearch BV.

This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/master/license.txt).
This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/main/license.txt).
2 changes: 1 addition & 1 deletion src/Elastic.CommonSchema.NLog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,4 @@ An example of the output is given below:

This software is Copyright (c) 2014-2020 by Elasticsearch BV.

This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/master/license.txt).
This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/main/license.txt).
2 changes: 1 addition & 1 deletion src/Elastic.CommonSchema.Serilog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ An example of the output is given below:

This software is Copyright (c) 2014-2020 by Elasticsearch BV.

This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/master/license.txt).
This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/main/license.txt).
6 changes: 3 additions & 3 deletions src/Elastic.CommonSchema/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ These types can be used in either as-is, or in conjunction with, the [Official .

The .NET assemblies are published to NuGet under the package name [Elastic.CommonSchema](http://nuget.org/packages/Elastic.CommonSchema)

The master branch pushes new NuGet packages on successful CI builds to https://ci.appveyor.com/nuget/ecs-dotnet
The main branch pushes new NuGet packages on successful CI builds to https://ci.appveyor.com/nuget/ecs-dotnet

## Versioning

Expand Down Expand Up @@ -191,10 +191,10 @@ This property is not part of the ECS specification, but is included as a means t

In instances where using the `IDictionary<string, object> Metadata` property is not sufficient, or there is a clearer definition of the structure of the ECS-compatible document you would like to index, it is possible to subclass the `Base` object and provide your own property definitions.

The Elastic.CommonSchema.BenchmarkDotNetExporter project takes this approach, in the [Domain source directory](https://github.com/elastic/ecs-dotnet/tree/master/src/Elastic.CommonSchema.BenchmarkDotNetExporter), where the BenchmarkDocument subclasses Base.
The Elastic.CommonSchema.BenchmarkDotNetExporter project takes this approach, in the [Domain source directory](https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.CommonSchema.BenchmarkDotNetExporter), where the BenchmarkDocument subclasses Base.

## Copyright and License

This software is Copyright (c) 2014-2020 by Elasticsearch BV.

This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/master/license.txt).
This is free software, licensed under: [The Apache License Version 2.0](https://github.com/elastic/ecs-dotnet/blob/main/license.txt).