Skip to content

Commit

Permalink
fix(elasticstack): return EcsTextFormatter metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Jan 18, 2023
1 parent 25eee62 commit ba5543d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Sitko.Core.ElasticStack/ElasticStackModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ public LoggerConfiguration ConfigureLogging(IApplicationContext context, Elastic

loggerConfiguration = loggerConfiguration
.Enrich.WithElasticApmCorrelationInfo()
.WriteTo.Elasticsearch(sinkOptions);
.WriteTo.Elasticsearch(sinkOptions)
// meta for EcsTextFormatter
.Enrich.WithProperty("ApplicationId", context.Id)
.Enrich.WithProperty("ApplicationName", context.Name)
.Enrich.WithProperty("ApplicationVersion", context.Version);
}

if (options.ApmEnabled)
Expand Down

0 comments on commit ba5543d

Please sign in to comment.