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

Sampling Rate #38

Closed
lashford opened this issue Oct 30, 2013 · 3 comments
Closed

Sampling Rate #38

lashford opened this issue Oct 30, 2013 · 3 comments
Assignees

Comments

@lashford
Copy link

We need to add a sampling rate to the pointcuts advices so to lower the performance hit on the monitored system.

The sampling rate needs to be configurable for:

  • actor selection using full actor path (akka://default/user/supervisor/$a)
  • actor selection using wildcard path, where * is any path element, .. is any path elements (akka://default/../supervisor)
  • actor selection using full actor type (akka:default.org.eignego.actors.FooActor or akka:*.org.eigengo.actors.FooActor, where * is any actor system name)
  • actor selection using wildcard actor type (akka:default._ :> org.eigengo.actors.FooActor)

The last point's syntax is arguably a bit hairy. It follows the Scala syntax, but we can also go for the AspectJ-style syntax: akka:default.org.eigengo.actors.FooActor+.

@janm399
Copy link
Member

janm399 commented Oct 30, 2013

Imagine

org.eigengo.monitor.agent {
    output {
        class: "org.eigengo.monitor.TestCounterInterface"
    }


    akka {
        included: [ "akka://default/user/foo", "akka.*.some.Foo" ]
        excluded: [ "akka://default/user/bar", "akka.*.some.Baz" ]

        sampling {
          rate: 5
          for: [ "akka://default/user/special"]
        }

        sampling {
          rate: 15
          for: [ "akka://default/user/baz"]
        }
    }
}

@janm399
Copy link
Member

janm399 commented Oct 30, 2013

This will also require state in the aspect: a map of JoinPoint + actor path => invocation count. If count % sampling == 0 then send to DD

However, remember that this will require some serious testing of race conditions.

@hughsimpson
Copy link
Contributor

#56 for sampling rate

@janm399 janm399 closed this as completed Nov 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants