Skip to content

Releases: atidev/ATI.Services.Common

v16.3.1

19 Jun 09:47
0904bc9
Compare
Choose a tag to compare

#84
Added try/catch in MetricsTimer.Dispose without throw to save top layers logic
Added log in HttpContextHelper.GetHeadersValues

v16.3.0

14 Jun 14:35
18b0439
Compare
Choose a tag to compare

#82
Added new extensions for HttpClient

  • GetStringAsync that return string value. Method has two versions with generic request model and without it

v16.1.0

05 Jun 10:32
cf83124
Compare
Choose a tag to compare

#81

  1. Added IConfigurationBuilder AddLogger extension
  2. Added KeepAlive and Port properties for DatabaseOptions.cs
  3. PostgresDapperProvider.cs DbManagerOptions now are IOptionsMonitor and support OnChange (for rotation)

v16.0.0

28 May 09:05
e341d8b
Compare
Choose a tag to compare

#80

  1. Migrated from .net 7 to .net 8
  2. Added HttpLoggingHandler, HttpMetricsHandler
  3. Added HttpClientExtensions with OperationResult support
  4. Added .AddCustomHttpClient extensions
  5. MetricsHttpClientWrapper now is obsolete

v15.0.0

28 Mar 11:45
0e9f94b
Compare
Choose a tag to compare

#77

  1. Now MetricsFactory is registered in DI and must be used from DI. Its methods create MetricsInstance instead of MetricsFactory
  2. Added .AddCustomHttpClient<>, .AddCustomHttpClients extensions which add Retry, CB, Timeout policies - https://github.com/atidev/ATI.Services.Common/pull/77/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R166
  3. BaseServiceOptions gets a lot of different properties to work with Policies. Just set "UseHttpClientFactory":true, call .AddCustomHttpClient<> or .AddCustomHttpClients in startup.cs - your HttpClient will be registered in IHttpClientFactory

v14.0.0

21 Mar 14:13
c6e2719
Compare
Choose a tag to compare

PosgtresDapper.ExecuteRawSqlAsync now:

  1. Requires queryName for metrics
  2. Has try/catch inside

fix logger encoding - now it doesn't escape html and cyrillic

v13.7.2

05 Mar 11:22
0f48984
Compare
Choose a tag to compare

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

05 Mar 10:46
b132482
Compare
Choose a tag to compare

What's Changed:

Fix in AppHttpContext when metrics written from place without HttpContext.

v13.7.0

01 Mar 10:00
0e1ed49
Compare
Choose a tag to compare

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

19 Feb 09:49
26229a3
Compare
Choose a tag to compare

New XssSanitizerAttribute was added.

How you can use it:

  1. With bad request when xss was detected:
[XssSanitizer(IsReplace = false)]
public string ParameterName { get; set; }
  1. With clean xss injection
[XssSanitizer]
public string ParameterName { get; set; }