Skip to content

Fail to restart monitoring server with the same Store #87

@denisshevchenko

Description

@denisshevchenko

When I run System.Remote.Monitoring.forkServerWith function the first time - it works perfectly. But if I killed the server explicitly (using serverThreadId) and then try to start it again with the same Store, the server cannot be launched because of an exception:

The name ""ekg.server_timestamp_ms"" is already taken by a metric.
CallStack (from HasCallStack):
  error, called at ./System/Metrics.hs:214:5 in ekg-core-0.1.1.7-6wBeq6DHUUjI67QEVzudFR:System.Metrics

This is the first line in forkServerWith function:

Metrics.registerCounter "ekg.server_timestamp_ms" getTimeMs store

Unfortunately, there is no way to "unregister" this Counter before restarting of the server. So, what can I do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions