-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #378 from senacor/feature/improve_logging
feature - Improve logging
- Loading branch information
Showing
5 changed files
with
68 additions
and
26 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 |
---|---|---|
|
@@ -160,8 +160,8 @@ export default middleware(functionHandler, [], [postFunction]); | |
|
||
### Logging and Tracing with appInsights | ||
|
||
To enhance the logging and tracing with appInsights you can wrap your function with the appInsightWrapper. Currently, this will log the query-parameter | ||
and binding-context of request into the customProperties, which will make your logs more searchable. | ||
To enhance the logging and tracing with appInsights you can wrap your function with the appInsightWrapper. | ||
Currently, this will add request parameters and workflow data into the customProperties, which will make your logs more searchable. | ||
|
||
Use the `AppInsightForHttpTrigger` for your http-functions: | ||
```typescript | ||
|
@@ -172,6 +172,10 @@ export default middleware([AppInsightForHttpTrigger.setup], handler, [AppInsight | |
|
||
and the `AppInsightForNonHttpTrigger` for functions with different kinds of trigger (e.g. `activityTrigger` or `timerTrigger`). | ||
|
||
Per default the request and response bodies of http requests are only logged if the request fails. You can customize this | ||
behavior by using `AppInsightForHttpTrigger.finalizeWithConfig(...)` instead of `AppInsightForHttpTrigger.finalizeAppInsight`. | ||
There you can also provide a function to sanitize the request and response bodies to prevent logging of sensitive data. | ||
|
||
## Support and Contact | ||
|
||
If you encounter any issues or have questions about using this middleware, please file an issue in this repository or contact the maintainers at <[email protected]> or <[email protected]>. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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