@@ -31,7 +31,7 @@ public <T> T executeWithStats(
3131 }
3232
3333 @ Override
34- public void count (String scope , String metric , long count , Attributes attributes ) {
34+ public synchronized void count (String scope , String metric , long count , Attributes attributes ) {
3535 for (OpenTelemetry otel : otels ) {
3636 Meter meter = otel .getMeter (scope );
3737 LongCounter counter = meter .counterBuilder (metric ).build ();
@@ -44,7 +44,7 @@ public void count(String scope, String metric, long count, Attributes attributes
4444 }
4545
4646 @ Override
47- public void time (String scope , String metric , long amount , Attributes attributes ) {
47+ public synchronized void time (String scope , String metric , long amount , Attributes attributes ) {
4848 for (OpenTelemetry otel : otels ) {
4949 Meter meter = otel .getMeter (scope );
5050 LongHistogram histogram =
@@ -58,7 +58,7 @@ public void time(String scope, String metric, long amount, Attributes attributes
5858 }
5959
6060 @ Override
61- public void gauge (String scope , String metric , long value , Attributes attributes ) {
61+ public synchronized void gauge (String scope , String metric , long value , Attributes attributes ) {
6262 for (OpenTelemetry otel : otels ) {
6363 Meter meter = otel .getMeter (scope );
6464 LongGaugeBuilder gaugeBuilder =
0 commit comments