Skip to content

Releases: atidev/ATI.Services.Common

v11.3.2

31 Jan 08:09
f8a1854
Compare
Choose a tag to compare
  • LocalCache: required flag for LocalCache initialization, this flag will not allow service to start in case of failed LocalCache initialization
  • RedisInitializer: RedisOptions.MustConnectOnInit will not allow service to start, limit retries to 3 times if flag is set + added log between retries

v11.3.1 Add Exception property to OperationResult

26 Jan 11:22
Compare
Choose a tag to compare

Add Exception property to OperationResult. Now if exception occurs in methods of classes: DapperDb, RedisCache, SlackAdapter, SlackApiAdapter, TracingHttpClientWrapper it saves in Exception property of OperationResult.

v11.3.0 logging responses of bad http-requests

12 Jan 13:43
32ccd94
Compare
Choose a tag to compare

In the TracingHttpClientWrapper class were made next changes:

  • now for every http request finished with bad status code a log message in the logContext property contains it's response body.
  • now the method public async Task<OperationResult<HttpResponseMessage<TResult>>> SendAsync(Uri fullUri, string metricName, TModel model, ...) writes log message to message property instead of the logContext property.
  • now the method private async Task<OperationResult<string>> SendAsync(string methodName, HttpMessage message) logs every respons with bad status code like in other methods of the class.

v11.2.1 Nullable lables in swagger and bugfixes

09 Jan 10:15
a3bde51
Compare
Choose a tag to compare
  • enables swagger v3
  • adds anchors for blocks in swagger ui(allows to share link to specific block in swagger ui)
  • fixes bug: 500 status code in endpoints with swagger under the high RPS(more details #43)

v11.2.0 Log level override

01 Dec 10:17
81cad5e
Compare
Choose a tag to compare

What's Changed

  • new setting LogLevelOverride allows to programmaticaly override log level for the TracingHttpClientWrapper,
  • now timeouts in TracingHttpClientWrapper will return as ActionStatus.Timeout

Add SlackApiAdapter

28 Nov 20:32
2c6779d
Compare
Choose a tag to compare

SlackApiAdapter

Configuring by SlackAdapterOptions

Required:

BotAccessToken - create app https://api.slack.com/apps
AlarmChannel - XXXXX from url in web browser https://app.slack.com/client/YYYYY/XXXXX
public async Task<OperationResult<PostMessageResponse>> SendMessageAsync(string message){
 ....
 }
 
public async Task<OperationResult<PostMessageResponse>> SendThreadMessageAsync(string message, string messageId){
 ....
 }

where messageId from SendMessageAsync response

v11.0.0

14 Oct 09:24
df6ac61
Compare
Choose a tag to compare

Add SerializerType to TracedHttpClientConfig.cs, TracingHttpClientWrapper.cs, BaseServiceOptions.cs. Now you can use System.Text.Json serializer. By default, it's Newtonsoft.Json.
TracingHttpClientWrapper.SendAsync now log responseMessage 500 status code as Error, not Warn

v10.2.0

11 Oct 09:51
0665a45
Compare
Choose a tag to compare

Add parameter int? timeoutInSeconds = null to all DapperDb.cs functions

Overload for OperationResult<T>

20 Sep 14:48
27556e1
Compare
Choose a tag to compare

Now you use OperationError in generic class OperationResult<T> like this:
return new OperationResult<T>(new OperationError(ActionStatus.BadRequest, "We couldn't find your firm, sorry", "firm_not_found"))

Corrected usage OperationResult

14 Sep 08:23
65b1fe7
Compare
Choose a tag to compare

Change default of isPrivate in overload:

OperationResult(ActionStatus actionStatus, string errorMessage, string error, bool isPrivate = false)

Because when you set the parameter errorMessage, first of all you want it to be seen