-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce readme for Elastic.Apm.NLog (#26)
* Introduce readme for Elastic.Apm.NLog Also link the project in the main readme * Update src/Elastic.Apm.NLog/readme.md * Update src/Elastic.Apm.NLog/readme.md * Review nitpicks
- Loading branch information
Showing
5 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Elastic APM NLog Layout Renderer | ||
|
||
Allows you to add the following place holders in your NLog templates | ||
|
||
* `ElasticApmTraceId` | ||
* `ElasticApmTransactionId` | ||
|
||
Which will be replaced with the appropriate Elastic APM variables if available | ||
|
||
|
||
## How to Enable | ||
|
||
```csharp | ||
var target = new MemoryTarget(); | ||
target.Layout = "${ElasticApmTraceId}|${ElasticApmTransactionId}|${message}"; | ||
Agent.Tracer.CaptureTransaction("TestTransaction", "Test", t => | ||
{ | ||
traceId = "trace-id"; | ||
transactionId = "transaction-id"; | ||
logger.Debug("InTransaction"); | ||
}); | ||
// Logged message will be in format of `trace-id|transation-id|InTransaction` | ||
// or `||InTransaction` if the place holders are not available | ||
``` | ||
|
||
## Prerequisite | ||
|
||
The prerequisite for this to work is a configured [Elastic APM Agent](https://github.com/elastic/apm-agent-dotnet). If the agent is not configured the APM place holders will be empty. | ||
|
||
## 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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters