Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Observer type #13

Open
Thomasdezeeuw opened this issue Jul 27, 2018 · 5 comments
Open

New Observer type #13

Thomasdezeeuw opened this issue Jul 27, 2018 · 5 comments
Labels
enhancement An improvement of the API. idea An idea, open to discussion. priority:low Low priority issue.

Comments

@Thomasdezeeuw
Copy link
Owner

This Observer allows metrics to be exported, including but not limited to:

  • Actor version.
  • Application version.
  • Target, e.g. x86_64-apple-darwin?
  • Number of processes used.
  • Memory usage.
  • Uptime, total time running since start.
  • Number of processes (actors, initiators and tasks).
  • Number of processes ready to run.
  • Maybe expose a process list; ProcessId, name (?) and ready state.

This is going to be hard when using a seperate process per core, rather then threads.

@Thomasdezeeuw Thomasdezeeuw added the idea An idea, open to discussion. label Jul 27, 2018
@Thomasdezeeuw
Copy link
Owner Author

This could be used by external crates to export to systems like Prometheus.

@Thomasdezeeuw
Copy link
Owner Author

Also need metrics from Initiators, e.g. the number of requests handled and in progress.

@Thomasdezeeuw
Copy link
Owner Author

Some more toughs.

An Observable which can be implemented by a types that can be observed.

pub trait Observable {
    // This would need to implement serde::Deserialise or something.
    type Metrics;

    fn observe(&self) -> Metrics;
}

For the ActorSystem (via ActorSystemRef) the metrics would be.

pub struct ActorSystemMetrics {
    active_actors: usize,
    inactive_actors: usize,
    total_actors_spawned: usize,
}

For TcpListener.

pub struct TcpListenerMetrics {
    accepted_connections: usize,
}

@Thomasdezeeuw
Copy link
Owner Author

@Thomasdezeeuw Thomasdezeeuw added the priority:low Low priority issue. label Mar 12, 2021
@Thomasdezeeuw
Copy link
Owner Author

See #484.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of the API. idea An idea, open to discussion. priority:low Low priority issue.
Projects
None yet
Development

No branches or pull requests

1 participant