You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem, including expected versus actual behavior:
When NLog starts up using a default configured EcsLayout, an exception is thrown that ElasticApmTraceId can not be found. This is because ElasticApmTraceId and ElasticApmTransactionId are defined in Package Elastic.Apm.NLog, however Elastic.Apm.NLog is not a required dependency of Elastic.CommonSchema.NLog through NuGet
Steps to reproduce:
Add NLog.Targets.ElasticSearch (alpha version, see above) and Elastic.CommonSchema.NLog 1.5.0 to your project.
Try to write a log message that is routed to the elastic target
exception is thrown:
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'Program' threw an exception.
Source=Program
StackTrace:
at Program.<Main>d__7.MoveNext() in ....\Program.cs:line 34
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
NLogConfigurationException: Exception when parsing ....\bin\Debug\netcoreapp3.1\NLog.config.
Inner Exception 2:
TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception 3:
ArgumentException: LayoutRenderer cannot be found: 'ElasticApmTraceId'
Expected Behavior:
Either the NuGet package should list Elastic.Apm.NLog as a dependency, or the Layout should be configured that it only uses items out of the Elastic.Apm.NLog package when it's available (possibly through reflection or a configuration option)
The text was updated successfully, but these errors were encountered:
…utomation
* upstream/master: (28 commits)
bump version to 1.5.1
move to released assembly differ
Expose Serialize(StringBuilder) overload (elastic#82)
fixelastic#79 only inject layout renderer keys for APM if Elastic.Apm.NLog … (elastic#83)
upgrade Bullseye from 3.0.0 to 3.3.0 (elastic#70)
NLog EcsLayout - Added support for Log Origin (elastic#78)
add benchmarks for simple serialization cases (elastic#81)
update integration tests
move to Elastic.Elasticsearch.Xunit
NLog Ecs Layout event Enrichment (elastic#74)
Microsoft.AspNetCore.Http.Abstractions ver. 2.1.0 has LTS (elastic#76)
EcsLayout - Use LogEventInfo.Logger instead of hardcoded DefaultLogger (elastic#67)
Added Beta Notice (elastic#65)
Bump to 1.5.0
Implement ECS schema 1.5 (elastic#60)
Update branch name
Bump to 1.4.4
Increase Elastic.Apm dependency to 1.4.0 (elastic#66)
Bump to 1.4.3
Modify accessors to mark internal/private and to not expose outside of assembly.
...
ECS schema version (e.g. 1.4.0):
1.5.0
ECS .NET assembly version (e.g. 1.4.2):
1.5.0
Elasticsearch version (if applicable):
7.2+
.NET framework / OS:
windows dotnetcore 3.1
Description of the problem, including expected versus actual behavior:
When NLog starts up using a default configured EcsLayout, an exception is thrown that
ElasticApmTraceId
can not be found. This is becauseElasticApmTraceId
andElasticApmTransactionId
are defined in PackageElastic.Apm.NLog
, howeverElastic.Apm.NLog
is not a required dependency ofElastic.CommonSchema.NLog
through NuGetSteps to reproduce:
NLog.Targets.ElasticSearch
(alpha version, see above) andElastic.CommonSchema.NLog
1.5.0 to your project.exception is thrown:
Expected Behavior:
Either the NuGet package should list
Elastic.Apm.NLog
as a dependency, or the Layout should be configured that it only uses items out of theElastic.Apm.NLog
package when it's available (possibly through reflection or a configuration option)The text was updated successfully, but these errors were encountered: