- Switched to
inspect
fromnode:util
to stringify values for logging - Changed
debug
andtrace
logs to severity level verbose
- Fix logging of errors throw by the handler
- Remove check for empty result
- Disable Application Insights internal debug logging
- Fix type of middleware function
~ Upgraded to Programming Model v4 (https://techcommunity.microsoft.com/t5/apps-on-azure-blog/azure-functions-node-js-v4-programming-model-is-generally/ba-p/3929217)
- Removed Node16 from the CI/CD Pipeline
~ Bump the version of jwt-decode
- Do not add the full content of
context.bindingData
tocustomDimensions
for app insights logging anymore as it contains i.e. the request body.
- Add
AppInsightForHttpTrigger.finalizeWithConfig
which allows you to configure when the request and response body should be logged and allows you to use a body sanitizer to remove sensitive data.
- Added the
context
as a parameter for theerrorResponseHandler
function to enhance error handling capabilities.
~ Resolve "_a.substring is not a function" error with applicationInsights. Issue was found in applicationinsights Library's TelemetryClient.trackTrace and EnvelopeFactory.createTraceData methods. This fix targets the compatibility issue observed in version 2.5.1 or higher.
- Introduced responseValidation functionality in the middleware. This new feature enhances the robustness of your applications by enabling schema validation for handlers' responses.
- Implemented the capability to dynamically enable or disable middleware functions within the execution flow. This addition brings conditional processing to your middleware stack, allowing greater control based on runtime conditions or application logic. Functions can now be seamlessly included or excluded from the execution process by resolving to true or false through a new integration pattern. This feature ensures that your application maintains high efficiency and adaptability in handling requests and processing logic.
- Post-Execution-Functions will now be executed, even if the handler failed
- The middlewareWithErrorHandling was removed. To regain the same functionality you can now pass an option-flag, called disableErrorHandling
- Added auto-logging functionality to the library that enhances searchability of saved log statements in Azure AppInsights by storing context properties in commonProperties.
- Removed the MiddlewareFunction-Type in favor for the azure-built-in one
- There are now two types of middleware available: one with error handling and one without. This is helpful because durable functions must throw their errors, otherwise the orchestrator will not restart a failed function.
- Added additional helper function to authentication requests by header parameters
- Updated multiple dependencies
- Updated axios dependency
- Updated test and build dependencies
- Updated production relevant dependency "@azure/functions" to 3.2.0
- Updated test and build dependencies
- Updated production relevant dependency "axios" to version 0.26.0
- Updated Azure Function dependency to 3.0.0
Features:
- add middleware for azure function to use generic functionality across multiple azure functions
- add joi validation as integration for the middleware to validate incoming requests against a schema
- add JWT authorization as integration for the middleware to authorize requests against a passed JWT