Skip to content

Commit

Permalink
fix: provide a meterregistry
Browse files Browse the repository at this point in the history
  • Loading branch information
lenaschoenburg committed Feb 27, 2025
1 parent 477ca1e commit 8198646
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import io.camunda.zeebe.db.*;
import io.camunda.zeebe.db.impl.DbNil;
import io.camunda.zeebe.protocol.EnumValue;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import java.io.File;
import java.util.Optional;
import java.util.TreeMap;
Expand All @@ -33,6 +35,7 @@ final class InMemoryDb<ColumnFamilyType extends Enum<? extends EnumValue> & Enum
implements ZeebeDb<ColumnFamilyType> {

private final TreeMap<Bytes, Bytes> database = new TreeMap<>();
private final MeterRegistry meterRegistry = new SimpleMeterRegistry();

@Override
public <KeyType extends DbKey, ValueType extends DbValue>
Expand Down Expand Up @@ -64,6 +67,11 @@ public boolean isEmpty(final ColumnFamilyType column, final TransactionContext c
return createColumnFamily(column, context, DbNullKey.INSTANCE, DbNil.INSTANCE).isEmpty();
}

@Override
public MeterRegistry getMeterRegistry() {
return meterRegistry;
}

@Override
public void close() {
database.clear();
Expand Down

0 comments on commit 8198646

Please sign in to comment.