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

What is the best way to shim Servo-enabled Metrics / Monitoring into Karyon #150

Closed
robertjchristian opened this issue Apr 15, 2013 · 8 comments

Comments

@robertjchristian
Copy link

For example, suppose before HelloWorldResource is encounted at Runtime in Karyon, a filter containing (ie) https://github.com/Netflix/servo/blob/master/servo-core/src/main/java/com/netflix/servo/examples/JvmMetricExample.java is run to keep track of all bytes in/out, etc for all Resources.

Basically we want to say "HelloWorldResource is your stub, and you get metrics and monitoring for free..."

Thanks

@brharrington
Copy link
Contributor

I forwarded your question to Nitesh who does more with Karyon.

Internally there are some metrics that come for free, but there are also some controls to allow for customization. For example to avoid metrics bloat we may only want metrics indicating the behavior of /api/foo as an aggregate and not /api/foo/${id}. I assume this is similar with the open source version, but Nitesh could give you a better answer.

@robertjchristian
Copy link
Author

"Internally there are some metrics that come for free" ----> I want to
hook specifically into this and extend it to add a few more freebies (ie
number connections, high water marks, bytes in/out, etc). Please point me
in the right direction. Thanks.

On Tue, Apr 16, 2013 at 10:59 AM, brharrington notifications@github.comwrote:

I forwarded your question to Nitesh who does more with Karyon.

Internally there are some metrics that come for free, but there are also
some controls to allow for customization. For example to avoid metrics
bloat we may only want metrics indicating the behavior of /api/foo as an
aggregate and not /api/foo/${id}. I assume this is similar with the open
source version, but Nitesh could give you a better answer.


Reply to this email directly or view it on GitHubhttps://github.com//issues/150#issuecomment-16460946
.

@NiteshKant
Copy link

Karyon does not really support the runtime aspects of service development as yet. So, it does not clearly provide any hooks or metrics related to service invocations. If you wish to do so, you would typically use a servlet filter to intercept the requests and provide the metrics you want.

@robertjchristian
Copy link
Author

Interesting. Okay, thanks.

On Tue, Apr 16, 2013 at 12:01 PM, Nitesh Kant notifications@github.comwrote:

Karyon does not really support the runtime aspects of service development
as yet. So, it does not clearly provide any hooks or metrics related to
service invocations. If you wish to do so, you would typically use a
servlet filter to intercept the requests and provide the metrics you want.


Reply to this email directly or view it on GitHubhttps://github.com//issues/150#issuecomment-16464895
.

@cfregly
Copy link
Contributor

cfregly commented Apr 16, 2013

+1 for this feature being added to karyon, Nitesh.

I understand the metrics-bloat argument, but it would be nice to enable/disable these metrics at the karyon level.

perhaps I can pick this task up. I'll work with you offline, Nitesh.

@robert: my fluxcapacitor project (https://github.com/cfregly/fluxcapacitor) explicitly adds these metrics directly into the edge and middletier service methods.

thanks!

-Chris

On Apr 16, 2013, at 12:18 PM, Robert Christian notifications@github.com wrote:

Interesting. Okay, thanks.

On Tue, Apr 16, 2013 at 12:01 PM, Nitesh Kant notifications@github.comwrote:

Karyon does not really support the runtime aspects of service development
as yet. So, it does not clearly provide any hooks or metrics related to
service invocations. If you wish to do so, you would typically use a
servlet filter to intercept the requests and provide the metrics you want.


Reply to this email directly or view it on GitHubhttps://github.com//issues/150#issuecomment-16464895
.


Reply to this email directly or view it on GitHub.

@robertjchristian
Copy link
Author

Thanks Chris. By edge do you mean class where the endpoint (jersey) is
defined? I have it there in my project as well. But unfortunately that's
part of the domain implementation and not the framework. (IE an individual
service implementation can more easily modify core/standard metrics)

On Tue, Apr 16, 2013 at 12:31 PM, Chris Fregly notifications@github.comwrote:

+1 for this feature being added to karyon, Nitesh.

I understand the metrics-bloat argument, but it would be nice to
enable/disable these metrics at the karyon level.

perhaps I can pick this task up. I'll work with you offline, Nitesh.

@robert: my fluxcapacitor project (
https://github.com/cfregly/fluxcapacitor) explicitly adds these metrics
directly into the edge and middletier service methods.

thanks!

-Chris

On Apr 16, 2013, at 12:18 PM, Robert Christian notifications@github.com
wrote:

Interesting. Okay, thanks.

On Tue, Apr 16, 2013 at 12:01 PM, Nitesh Kant notifications@github.comwrote:

Karyon does not really support the runtime aspects of service
development
as yet. So, it does not clearly provide any hooks or metrics related
to
service invocations. If you wish to do so, you would typically use a
servlet filter to intercept the requests and provide the metrics you
want.


Reply to this email directly or view it on GitHub<
https://github.com/Netflix/servo/issues/150#issuecomment-16464895>
.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/150#issuecomment-16466569
.

@cfregly
Copy link
Contributor

cfregly commented Apr 16, 2013

correct - they are domain classes and not karyon framework classes,
unfortunately.

to be clear for others that may be following, the 2 domain classes that
we're talking about are as follows

https://github.com/cfregly/fluxcapacitor/blob/master/flux-edge/src/main/java/com/fluxcapacitor/edge/jersey/resources/EdgeResource.java
https://github.com/cfregly/fluxcapacitor/blob/master/flux-middletier/src/main/java/com/fluxcapacitor/middletier/jersey/resources/MiddleTierResource.java

these track request-level metrics that would best be replaced by a karyon
servlet filter.

I'll create an issue under the karyon project for traceability. at
minimum, it would be nice to have a standard karyon-framework-level servlet
filter that we can use.

i'm pretty sure this is on the roadmap as this servlet-filter is used
heavily at Netflix under the name NFFilter. Nitesh may have more info on
the timeline of the open source release.

good catch, Robert!

-Chris

On Apr 16, 2013, at 12:40 PM, Robert Christian notifications@github.com
wrote:

Thanks Chris. By edge do you mean class where the endpoint (jersey) is
defined? I have it there in my project as well. But unfortunately that's
part of the domain implementation and not the framework. (IE an individual
service implementation can more easily modify core/standard metrics)

On Tue, Apr 16, 2013 at 12:31 PM, Chris Fregly notifications@github.comwrote:

+1 for this feature being added to karyon, Nitesh.

I understand the metrics-bloat argument, but it would be nice to
enable/disable these metrics at the karyon level.

perhaps I can pick this task up. I'll work with you offline, Nitesh.

@robert: my fluxcapacitor project (
https://github.com/cfregly/fluxcapacitor) explicitly adds these metrics
directly into the edge and middletier service methods.

thanks!

-Chris

On Apr 16, 2013, at 12:18 PM, Robert Christian notifications@github.com
wrote:

Interesting. Okay, thanks.

On Tue, Apr 16, 2013 at 12:01 PM, Nitesh Kant notifications@github.comwrote:

Karyon does not really support the runtime aspects of service
development
as yet. So, it does not clearly provide any hooks or metrics related
to
service invocations. If you wish to do so, you would typically use a
servlet filter to intercept the requests and provide the metrics you
want.


Reply to this email directly or view it on GitHub<
https://github.com/Netflix/servo/issues/150#issuecomment-16464895>
.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub<
https://github.com/Netflix/servo/issues/150#issuecomment-16466569>
.


Reply to this email directly or view it on
GitHubhttps://github.com//issues/150#issuecomment-16467032
.

@dmuino dmuino closed this as completed Apr 19, 2013
@dmuino
Copy link
Contributor

dmuino commented Apr 19, 2013

I closed this since this is not a Servo specific issue.

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

5 participants