Skip to content

Commit e6174f7

Browse files
committed
1.2.14 (#60)
1 parent 0833a44 commit e6174f7

14 files changed

Lines changed: 125 additions & 50 deletions

File tree

mkdocs/config/en/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ site_dir: "../../generated/en"
33

44

55
# Project information
6-
site_name: Kora Framework 1.2.13
6+
site_name: Kora Framework 1.2.14
77
site_url: https://kora-projects.github.io/kora-docs/en/
88
nav:
99
- Examples:

mkdocs/config/ru/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ site_dir: "../../generated/ru"
33

44

55
# Project information
6-
site_name: Kora фреймворк 1.2.13
6+
site_name: Kora фреймворк 1.2.14
77
site_url: https://kora-projects.github.io/kora-docs/ru/
88
nav:
99
- Примеры:

mkdocs/docs/en/changelog/changelog.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,16 @@ hide:
55
- navigation
66
---
77

8-
## 1.2.13
8+
## 1.2.14
9+
10+
Fixed:
11+
12+
- Fixed HTTP client and Database repository parent interfaces search for AOP methods
13+
- Fixed correct Redis cache `mappingFunction` and `null` restricted key handling
14+
- Fixed Cache super interfaces search for implementation
15+
- Fixed JUnit test extension graph cleanup in `afterAll` for `@Nested` test classes with `PER_METHOD` initialization
16+
17+
### 1.2.13
918

1019
Added:
1120

mkdocs/docs/en/documentation/general.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ dependency `ru.tinkoff.kora:kora-parent` which requires to specify the version o
125125
}
126126

127127
dependencies {
128-
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.13")
128+
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.14")
129129
annotationProcessor "ru.tinkoff.kora:annotation-processors"
130130
}
131131
```
@@ -164,7 +164,7 @@ dependency `ru.tinkoff.kora:kora-parent` which requires to specify the version o
164164
}
165165

166166
dependencies {
167-
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.13"))
167+
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.14"))
168168
ksp("ru.tinkoff.kora:symbol-processors")
169169
}
170170
```
@@ -190,7 +190,7 @@ and the [BOM dependency](https://docs.gradle.org/current/userguide/platforms.htm
190190
}
191191

192192
dependencies {
193-
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.13")
193+
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.14")
194194
annotationProcessor "ru.tinkoff.kora:annotation-processors"
195195
}
196196
```
@@ -209,7 +209,7 @@ and the [BOM dependency](https://docs.gradle.org/current/userguide/platforms.htm
209209
}
210210

211211
dependencies {
212-
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.13"))
212+
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.14"))
213213
ksp("ru.tinkoff.kora:symbol-processors")
214214
}
215215
```

mkdocs/docs/en/documentation/http-server.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ Example of the complete configuration described in the `HttpServerConfig` class
7070
enabled = false //(16)!
7171
stacktrace = true //(17)!
7272
mask = "***" //(18)!
73-
maskqueries = [ ] //(19)!
74-
maskheaders = [ "authorization", "cookie", "set-cookie" ] //(20)!
75-
pathtemplate = true //(21)!
73+
maskQueries = [ ] //(19)!
74+
maskHeaders = [ "authorization", "cookie", "set-cookie" ] //(20)!
75+
pathTemplate = true //(21)!
7676
}
7777
metrics {
7878
enabled = true //(22)!

mkdocs/docs/en/documentation/openapi-codegen.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ or create declarative [HTTP clients](http-client.md) from OpenAPI contracts usin
99
```groovy
1010
buildscript {
1111
dependencies {
12-
classpath("ru.tinkoff.kora:openapi-generator:1.2.13")
12+
classpath("ru.tinkoff.kora:openapi-generator:1.2.14")
1313
}
1414
}
1515
```
@@ -29,7 +29,7 @@ or create declarative [HTTP clients](http-client.md) from OpenAPI contracts usin
2929
```groovy
3030
buildscript {
3131
dependencies {
32-
classpath("ru.tinkoff.kora:openapi-generator:1.2.13")
32+
classpath("ru.tinkoff.kora:openapi-generator:1.2.14")
3333
}
3434
}
3535
```

mkdocs/docs/en/documentation/tracing.md

Lines changed: 68 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -259,33 +259,87 @@ You can create a span with the current one in parent as follows:
259259
}
260260
```
261261

262-
## Get tracing
262+
## Асинхронная трассировка
263263

264-
Obtain the current tracing `Span`, you can use the `getSpan` method in `OpentelemetryContext`:
264+
In addition to spans automatically created by the framework, you can use the `Tracer` object from the container to create your own traces. The main challenge lies in correctly propagating the context `Fork` to another execution thread to ensure the trace works properly.
265+
266+
To create a trace for asynchronous code inherited from the current parent context, you can do the following:
265267

266268
===! ":fontawesome-brands-java: `Java`"
267269

270+
Example is shown for the `CompletableStage` asynchronous approach:
271+
268272
```java
269-
var span = OpentelemetryContext.getSpan();
270-
```
273+
@Component
274+
public final class MyService {
271275

272-
=== ":simple-kotlin: `Kotlin`"
276+
private final io.opentelemetry.api.trace.Tracer tracer;
273277

274-
```kotlin
275-
val span = OpentelemetryContext.getSpan();
276-
```
278+
public MyService(Tracer tracer) {
279+
this.tracer = tracer;
280+
}
277281

278-
Obtain the current trace ID, you can use the `getTraceId()` method in `OpentelemetryContext`:
282+
public CompletionStage<String> doTraceWork() {
283+
var ctx = ru.tinkoff.kora.common.Context.current().fork();
284+
var otctx = OpentelemetryContext.get(ctx);
285+
var span = tracer.spanBuilder("myOperation")
286+
.setParent(otctx.getContext())
287+
.startSpan();
279288

280-
===! ":fontawesome-brands-java: `Java`"
289+
return CompletableFuture.supplyAsync(() -> {
290+
OpentelemetryContext.set(ctx, otctx.add(span));
291+
var result = doWork();
292+
return result;
293+
})
294+
.whenComplete((r, e) -> {
295+
if (e != null) {
296+
span.recordException(e);
297+
span.setStatus(StatusCode.ERROR, e.getMessage());
298+
} else {
299+
span.setStatus(StatusCode.OK);
300+
}
301+
span.end();
302+
});
303+
}
281304

282-
```java
283-
var traceId = OpentelemetryContext.getTraceId();
305+
public String doWork() {
306+
// do some work
307+
}
308+
}
284309
```
285310

286311
=== ":simple-kotlin: `Kotlin`"
287312

313+
Example is shown for the `suspend` asynchronous approach:
314+
288315
```kotlin
289-
val traceId = OpentelemetryContext.getTraceId();
290-
```
316+
@Component
317+
class MyService(private val tracer: io.opentelemetry.api.trace.Tracer) {
318+
319+
suspend fun doTraceWork(): String {
320+
val ctx = ru.tinkoff.kora.common.Context.current()
321+
val otctx = OpentelemetryContext.get(ctx)
322+
val span = tracer.spanBuilder("myOperation")
323+
.setParent(otctx.getContext())
324+
.startSpan()
291325

326+
OpentelemetryContext.set(ctx, otctx.add(span))
327+
return withContext(Context.Kotlin.asCoroutineContext(ctx)) {
328+
try {
329+
val result = doWork()
330+
span.setStatus(StatusCode.OK)
331+
result
332+
} catch (e: Exception) {
333+
span.recordException(e)
334+
span.setStatus(StatusCode.ERROR, e.message)
335+
throw e
336+
} finally {
337+
span.end()
338+
OpentelemetryContext.set(ctx, otctx)
339+
}
340+
}
341+
}
342+
343+
fun doWork(): String = // do some work
344+
}
345+
```

mkdocs/docs/en/examples/hello-world.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Basic concepts and description of the framework can be read on the [main page](.
5151
}
5252

5353
dependencies {
54-
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.13")
54+
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.14")
5555
annotationProcessor "ru.tinkoff.kora:annotation-processors"
5656

5757
implementation "ru.tinkoff.kora:http-server-undertow"
@@ -88,7 +88,7 @@ Basic concepts and description of the framework can be read on the [main page](.
8888
}
8989

9090
dependencies {
91-
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.13"))
91+
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.14"))
9292
ksp("ru.tinkoff.kora:symbol-processors")
9393

9494
implementation("ru.tinkoff.kora:http-server-undertow")

mkdocs/docs/ru/changelog/changelog.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@ hide:
55
- navigation
66
---
77

8-
## 1.2.13
8+
## 1.2.14
9+
10+
Исправлено:
11+
12+
- Исправлен поиск AOP методов в родительских интерфейсах для HTTP-клиента и репозитория базы данных
13+
- Исправлена корректная обработка `mappingFunction` кэша Redis и ключей с ограничением на `null`
14+
- Исправлен поиск родительских интерфейсов реализации для кэшей
15+
- Исправлена очистка графа в расширении JUnit тестов в методе `afterAll` для вложенных тестовых классов (`@Nested`) с инициализацией `PER_METHOD`
16+
17+
### 1.2.13
18+
919
Добавлено:
1020

1121
- Добавлена поддержка кастомной настройки HTTP-обработчиков в Undertow через `HttpHandlerConfigurer`

mkdocs/docs/ru/documentation/general.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Kafka продюсеров, репозиториев баз данных и та
125125
}
126126

127127
dependencies {
128-
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.13")
128+
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.14")
129129
annotationProcessor "ru.tinkoff.kora:annotation-processors"
130130
}
131131
```
@@ -164,7 +164,7 @@ Kafka продюсеров, репозиториев баз данных и та
164164
}
165165

166166
dependencies {
167-
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.13"))
167+
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.14"))
168168
ksp("ru.tinkoff.kora:symbol-processors")
169169
}
170170
```
@@ -190,7 +190,7 @@ Kafka продюсеров, репозиториев баз данных и та
190190
}
191191

192192
dependencies {
193-
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.13")
193+
koraBom platform("ru.tinkoff.kora:kora-parent:1.2.14")
194194
annotationProcessor "ru.tinkoff.kora:annotation-processors"
195195
}
196196
```
@@ -209,7 +209,7 @@ Kafka продюсеров, репозиториев баз данных и та
209209
}
210210

211211
dependencies {
212-
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.13"))
212+
koraBom(platform("ru.tinkoff.kora:kora-parent:1.2.14"))
213213
ksp("ru.tinkoff.kora:symbol-processors")
214214
}
215215
```

0 commit comments

Comments
 (0)