Releases: atidev/ATI.Services.Common
Releases · atidev/ATI.Services.Common
v16.3.1
v16.3.0
v16.1.0
v16.0.0
v15.0.0
- Now
MetricsFactory
is registered in DI and must be used from DI. Its methods createMetricsInstance
instead ofMetricsFactory
- Added
.AddCustomHttpClient<>
,.AddCustomHttpClients
extensions which add Retry, CB, Timeout policies - https://github.com/atidev/ATI.Services.Common/pull/77/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R166 BaseServiceOptions
gets a lot of different properties to work with Policies. Just set"UseHttpClientFactory":true
, call.AddCustomHttpClient<>
or.AddCustomHttpClients
instartup.cs
- yourHttpClient
will be registered inIHttpClientFactory
v14.0.0
v13.7.2
New:
- Added the ability to connect serializers (now works for Redis) without bringing the dependency into common.
- Added support for binary serializers in Redis.
- Added SerializerProvider - gets registered common serializers from DI
- SerializerFactory is marked obsolete - you should stop using it both inside and outside common.
- Added interface IBinarySerializer
Requires your attention:
- enum SerializerType - no longer describes all possible serializer types available in common. (Serializers can be connected via DI and will be available in SerializerProvider/RedisCache)
- Changed the RedisOptions.Serializer property type from enum SerializerType to string. There is no need to take any action regarding this.
- The ctor RedisCache and RedisScriptCache have changed - if for some reason you created RedisCache directly through the ctor, use the creation through RedisProvider.
For what:
- Maybe you want or have been recommended to try some serializer (there are a great many of them) to optimize reading/writing to/from radishes and reduce storage volumes. Now you don't need to make this a dependency for all commands.
- Reducing the cohesion of namespaces within common for subsequent decomposition
How to add your own serializer for Redis:
- Create an implementation of the ISerializer or IBinarySerializer interface from the ati.services.common space and place it in a service/separate package/common - think about those who don't need it.
- Register your serializer like this:
services.AddSingleton<ISerializer, Your implementation>()
or
services.AddSingleton<IBinarySerializer, Your implementation>()
- Write the name of your serializer in your RedisOptions.Serializer. For example:
"Keshik": {
"TimeToLive": "1.00:00:00",
...
"Serializer": "MemoryPack"
},
v13.7.1
v13.7.0
What's Changed
- Group prometheus metrics by @muphblu in #72
- new metrics, changed naming, labels, factory methods etc.
- updated prometheus-net to v8.2.1 due to bug that was fixed in v8.1.1
- updated Microsoft.Data.SqlClient to v5.2.0 due to dotnet/SqlClient#1930
- updated setting TrustServerCertificate in sql connection string is ignored and is true by default, could be overriden through DataBaseOptions
Full Changelog: v13.6.0...v13.7.0
New metrics list
common_metric_sql
common_metric_http_client - for outgoing http requests, ConsulMetricsHttpClientWrapper uses it
common_metric_rabbitmq_subscibe - incoming messages from rmq, used by ATI.Services.RabbitMQ and ChangeTracking
common_metric_rabbitmq_publish - outgoing messages to rmq
common_metric_repository
common_metric_controller - incoming http requests, added by MeasureAttribute
common_metric_Exceptions
common_metric_HttpStatusCodeCounter - response codes
common_metric_redis
common_metric_mongo
common_metric_{something} - this one reserved for custom metric, if you really need it, try to keep number of unique metrics as low as possible
v13.6.0
New XssSanitizerAttribute was added.
How you can use it:
- With bad request when xss was detected:
[XssSanitizer(IsReplace = false)]
public string ParameterName { get; set; }
- With clean xss injection
[XssSanitizer]
public string ParameterName { get; set; }