Releases: atidev/ATI.Services.Common
v11.3.2
- 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
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
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 tomessage
property instead of thelogContext
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
- 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
What's Changed
- new setting
LogLevelOverride
allows to programmaticaly override log level for theTracingHttpClientWrapper
, - now timeouts in
TracingHttpClientWrapper
will return asActionStatus.Timeout
Add SlackApiAdapter
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
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
Overload for OperationResult<T>
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
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