Fix build.
Downgrade OpenTelemetry.Instrumentation.AspNetCore version due to build issues.
Updated OpenTelemetry.Instrumentation.AspNetCore version.
Updated dependencies.
Fix tests compability
Add ignored exception types option on request cancellation for UnhandledExceptionsMiddleware.
Add logging responses by list of status code.
Added OpenTelemetry metrics resources setup extension ConfigureVostokOpenTelemetryMeterProvider
.
Added OpenTelemetry extensions and context propagator.
Fixed AddVostokEnvironmentComponents
: not dispose components by DI.
Allowed to warm up arbitrary url in MiddlewaresWarmup
.
Made RequestTracker
result public.
Made helper classes public to be used in hosting.aspnetcore
module.
Added AddHostedServiceFromApplication
and AddBackgroundServiceFromApplication
extensions for IServiceCollection
.
Implement VostokApplicationHostedService
in addition to VostokApplicationBackgroundService
.
Added a way to provide additional annotations based on HttpContext.
Fixed bug with non-registered RequiresMergedConfigurationAttribute
as settings provider.
Use ConfigureWebHostInternal
for WebApplicationBuilder
instead of Kestrel configuration.
Added a way to provide WebApplicationOptions
.
By default ignored only Microsoft.AspNetCore*
scopes instead of Microsoft*
.
Fixed a bug where TracingMiddleware
could fail building an url when path is malicious.
Added virtual methods WarmupAsync
and WarmupServicesAsync
to VostokNetCoreApplication
.
Added BaseUrl
setting to TracingMiddleware
. Set default of IReplicaInfo.Url
.
Use MergedConfigurationSource
instead of combining ConfigurationSource
and SecretConfigurationSource
.
Added new VostokAspNetCoreWebApplication
template based on .NET 6 Minimal API.
Added net6.0
target.
Added net6.0 target.
Server spans are now sending Cancelled
if request was aborted before passing through throttling queue.
Added EnableVostokMiddleware
extension.
Added WarmupServicesAsync
method.
Public ServiceCollectionExtensions.
Mitigated #47
Do not send ping request if PingApiMiddleware disabled.
Added graceful shutdown of VostokHost when Microsoft AspNetCore host has stopped.
Logging improvements.
Added a scoped registration of IRequestInfo to the DI container.
Added a net5.0 target.
- Added
DoDisposeAsync
virtual method.
- Fixed
_diagnostic
relative path bug. - Added middlewares warmup during initialization to reduce first request time.
Register required configuration types as Func<TSettings>
.
VostokAspNetCoreApplication, VostokNetCoreApplication: made InitializeAsync method virtual.
Implemented a limit on the size of single WriteAsync call to response body to prevent excessive response buffering and inefficiency of throttling middleware.
ThrottlingMiddleware no longer passes requests aborted during throttlings (this may occur if client does not reveal its true timeout or closes connection unexpectedly).
New features:
- Diagnostic API middleware
- Diagnostic info providers (throttling, current requests)
- Throttling-based health check
- 2-way integration with Asp.NET Core health checks (only on .NET Core)
- Integration of new health checks with ping API
- Conversion between IVostokApplication and IHostedService
- AddAspNetCore and AddNetCore extensions for ICompositeApplicationBuilder
Minor tweaks:
- LoggingSettings: do not log response completion events by default.
Enabled SourceLink.
- Ignore all Microsoft log scopes by default.
- Use Warning level for MS logs when user doesn't specify it explicitly.
- UnhandledExceptionMiddleware no longer swallows exceptions that happen during response body streaming (that could prevent Kestrel from flushing its output buffers).
- UnhandledExceptionMiddleware now clears any custom headers the app might have set when responding with HTTP 500.
- TracingMiddleware now formats trace ids in response header without dashes ("N" format).
- UsePathBase middleware is now registered before Vostok middlewares --> ping API works with base URL prefix.
- Throttling provider is now registered in DI container even if ThrottlingMiddleware is disabled in case user adds it back manually in a different position.
- User application classes can now override
DoDispose
method to perform cleanup. - Added a couple of functional tests for middlewares.
Fill headers in ping api middleware.
Do not explicitly disallow synchronous I/O in Kestrel, rely on Asp.NET Core defaults.
Use Microsoft constant from vostok.logging.microsoft
module.
Major changes in this release:
- Multitargeting. In addition to
netcoreapp3.1
we now also targetnetstandard2.0
and Asp.NET Core 2.1 (see #8). It's also reflected in Cementmodule.yaml
as two new module configurations:v3_1
(default) andv2_1
. This allows to use the library in .NET Framework applications. - Built-in middlewares no longer implement
IMiddleware
interface. - Built-in middlewares are no longer instantiated manually.
- Built-in middlewares now use options pattern to receive configuration from DI container.
- Built-in middleware classes are all public now.
- Built-in middlewares can now be disabled, both entirely and selectively.
- Built-in middlewares can now be added with public
IApplicationBuilder
extensions. - Significant internal refactoring necessitated by multitargeting approach.
Minor changes:
- (Breaking change!)
ThrottlingMetricsOptions
have been moved fromThrottlingSettings
to anIVostokThrottlingBuilder
property. UnhandledExceptionMiddleware
now has its own settings class.- All middlewares now enrich their log instances with source context.
LoggingMiddleware
,TracingMiddleware
andThrottlingMiddleware
now tolerate absence of theFillRequestInfoMiddleware
.LoggingMiddleware
now also logs response completion time, which includes the time it takes to send data to the client (save for small buffered writes).- Added xml-docs for
IVostokAspNetCoreApplicationBuilder
methods. - Added configuration of generic host shutdown timeout based on Vostok environment.
Added VostokNetCoreApplication
instead of DisableWebHost
.
Added UseCustomPropertyQuota
extension to configure throttling by custom property.
Extract commit hash from calling assembly instead of entry assembly.
Added VostokAspNetCoreApplication
without Startup
.
- Added an option to disable WebHost.
- Added arbitrary customization of generic host.
- Added an extension to register IHostedServices.
Initial prerelease.