File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
testkit/src/main/scala/org/typelevel/otel4s/oteljava/testkit
trace-testkit/src/main/scala/org/typelevel/otel4s/oteljava/testkit/trace Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
import com .typesafe .tools .mima .core ._
2
2
3
- ThisBuild / tlBaseVersion := " 0.13 "
3
+ ThisBuild / tlBaseVersion := " 0.14 "
4
4
5
5
ThisBuild / organization := " org.typelevel"
6
6
ThisBuild / organizationName := " Typelevel"
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ object OtelJavaTestkit {
86
86
def tracerProvider : TracerProvider [F ] = traces.tracerProvider
87
87
def propagators : ContextPropagators [Context ] = traces.propagators
88
88
def finishedSpans [A : FromSpanData ]: F [List [A ]] = traces.finishedSpans
89
+ def resetSpans : F [Unit ] = traces.resetSpans
89
90
def collectMetrics [A : FromMetricData ]: F [List [A ]] = metrics.collectMetrics
90
91
}
91
92
Original file line number Diff line number Diff line change @@ -55,11 +55,15 @@ trait TracesTestkit[F[_]] {
55
55
* TracesTestkit[F].finishedSpans[SpanData] // OpenTelemetry Java models
56
56
* }}}
57
57
*
58
- * @note
59
- * each invocation cleans up the internal buffer.
58
+ * @see
59
+ * [[ resetSpans ]] to reset the internal buffer
60
60
*/
61
61
def finishedSpans [A : FromSpanData ]: F [List [A ]]
62
62
63
+ /** Resets the internal buffer.
64
+ */
65
+ def resetSpans : F [Unit ]
66
+
63
67
/** The propagators used by the [[org.typelevel.otel4s.trace.TracerProvider TracerProvider ]].
64
68
*/
65
69
def propagators : ContextPropagators [Context ]
@@ -137,6 +141,8 @@ object TracesTestkit {
137
141
result <- Async [F ].delay(exporter.getFinishedSpanItems)
138
142
} yield result.asScala.toList.map(FromSpanData [A ].from)
139
143
144
+ def resetSpans : F [Unit ] =
145
+ Async [F ].delay(exporter.reset())
140
146
}
141
147
142
148
}
You can’t perform that action at this time.
0 commit comments