[jira] [Commented] (SLING-8757) Add option to set/edit access control policies at user homes
[ https://issues.apache.org/jira/browse/SLING-8757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17016639#comment-17016639 ] Varun Nagpal commented on SLING-8757: - [~bdelacretaz] Is there any ETA for a fix for this issue? Our project is dependent on its use. Thanks. > Add option to set/edit access control policies at user homes > > > Key: SLING-8757 > URL: https://issues.apache.org/jira/browse/SLING-8757 > Project: Sling > Issue Type: Improvement > Components: Repoinit >Reporter: Angela Schreiber >Priority: Major > Fix For: Repoinit JCR 1.1.18, Repoinit Parser 1.3.4 > > > [~rombert], while looking into moving all service user creation and > permission setup from content packages to repo init, i noticed that there is > one special case that doesn't seem to be covered by repo init but possible > with Jackrabbit content packages: creating/editing access control policies at > a user home. the path of those is an implementation detail and cannot be > 'guessed'. > based on my previous work on the repo-init grammar, i could envision the > following main options to include this functionality. > # explicitly extend the 'path-token' which is currently defined to be > {{(PATH_STRING> | t = )}} to something like {{(PATH_STRING> > | t = | )}}. > # similar to the first one: but don't touch the grammar just extend the > jcr-implementation: if 'path' is a relative path and is not _repository_, > treat it as userId and try to obtain a path from the corresponding user > object. > # completely separate it from the 'pathList' and don't allow a combination of > absolute paths, repository-marker and userIds, explicitly include the notion > that the edited policy is not bound to a regular path but to a user home > instead of {{on /abspath, repository}} it then would e.g. say {{on user id1, > id2}} > without having looked into it in great detail and given the fact that there > are already so many different ways to edit access control content with > repo-init, the first option would feel the most natural to me. > wdyt? i could try to come up with a patch/tests/docu, but i would love to > avoid investing a lot of time and then have to throw it away or redo it all > over again. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (SLING-6886) JcrListenerBaseConfig sets external flag incorrectly
[ https://issues.apache.org/jira/browse/SLING-6886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Varun Nagpal updated SLING-6886: Description: o.a.s.j.r.i.JcrListenerBaseConfig.java sets the NoExternal flag incorrectly. See http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrListenerBaseConfig.java?view=markup#l125 This impacts JcrResourceListener and OsgiObservationBridge which does not convert JCR observation events to OSGi events which are not local to the Sling instance. was: o.a.s.j.r.i.JcrListenerBaseConfig.java sets the NoExternal flag incorrectly. See http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrListenerBaseConfig.java?view=markup#l125 This impacts JcrResourceListener which does not convert JCR observation events to OSGi events which are not local to the Sling instance. > JcrListenerBaseConfig sets external flag incorrectly > > > Key: SLING-6886 > URL: https://issues.apache.org/jira/browse/SLING-6886 > Project: Sling > Issue Type: Bug > Components: JCR >Affects Versions: JCR Resource 2.9.2 >Reporter: Varun Nagpal > Fix For: JCR Resource 3.0.2 > > Attachments: SLING-6886.patch > > > o.a.s.j.r.i.JcrListenerBaseConfig.java sets the NoExternal flag incorrectly. > See > http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrListenerBaseConfig.java?view=markup#l125 > This impacts JcrResourceListener and OsgiObservationBridge which does not > convert JCR observation events to OSGi events which are not local to the > Sling instance. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (SLING-6886) JcrListenerBaseConfig sets external flag incorrectly
[ https://issues.apache.org/jira/browse/SLING-6886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Varun Nagpal updated SLING-6886: Attachment: SLING-6886.patch [~cziegeler] Please review and apply as necessary. Thanks. > JcrListenerBaseConfig sets external flag incorrectly > > > Key: SLING-6886 > URL: https://issues.apache.org/jira/browse/SLING-6886 > Project: Sling > Issue Type: Bug > Components: JCR >Affects Versions: JCR Resource 2.9.2 >Reporter: Varun Nagpal > Fix For: JCR Resource 3.0.2 > > Attachments: SLING-6886.patch > > > o.a.s.j.r.i.JcrListenerBaseConfig.java sets the NoExternal flag incorrectly. > See > http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrListenerBaseConfig.java?view=markup#l125 > This impacts JcrResourceListener which does not convert JCR observation > events to OSGi events which are not local to the Sling instance. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Created] (SLING-6886) JcrListenerBaseConfig sets external flag incorrectly
Varun Nagpal created SLING-6886: --- Summary: JcrListenerBaseConfig sets external flag incorrectly Key: SLING-6886 URL: https://issues.apache.org/jira/browse/SLING-6886 Project: Sling Issue Type: Bug Components: JCR Affects Versions: JCR Resource 2.9.2 Reporter: Varun Nagpal Fix For: JCR Resource 3.0.2 o.a.s.j.r.i.JcrListenerBaseConfig.java sets the NoExternal flag incorrectly. See http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrListenerBaseConfig.java?view=markup#l125 This impacts JcrResourceListener which does not convert JCR observation events to OSGi events which are not local to the Sling instance. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
Re: [vote] Accept the contribution of Log Tail Plugin tracked in SLING-4897
Hi Bertrand, I have received the acceptance mail from Craig stating that the ICLA has been filed. Please let me know the further steps to take. Thanks. -- Varun On Thu, Aug 6, 2015 at 4:16 PM, Varun Nagpal varun.nag...@gmail.com wrote: Thanks Bertrand, Chetan and Robert for the +1s @Bertrand, I have mailed the iCLA. Awaiting further instructions. Thanks. -- Varun On Tue, Aug 4, 2015 at 7:08 PM, Bertrand Delacretaz bdelacre...@apache.org wrote: Hi, On Wed, Jul 22, 2015 at 4:15 PM, Varun Nagpal varun.nag...@gmail.com wrote: This thread is about voting for the acceptance of the Log Tail Plugin tracked in SLING-4897... +1 for the donation - with this we have 3 +1s from PMC members so we can go on. Varun, could you submit an iCLA as per https://www.apache.org/licenses/icla.txt ? Once that's filed we can commit your patch, as it's a fairly small contribution I don't think a software grant is required. -Bertrand
Re: [vote] Accept the contribution of Log Tail Plugin tracked in SLING-4897
Thanks Bertrand, Chetan and Robert for the +1s @Bertrand, I have mailed the iCLA. Awaiting further instructions. Thanks. -- Varun On Tue, Aug 4, 2015 at 7:08 PM, Bertrand Delacretaz bdelacre...@apache.org wrote: Hi, On Wed, Jul 22, 2015 at 4:15 PM, Varun Nagpal varun.nag...@gmail.com wrote: This thread is about voting for the acceptance of the Log Tail Plugin tracked in SLING-4897... +1 for the donation - with this we have 3 +1s from PMC members so we can go on. Varun, could you submit an iCLA as per https://www.apache.org/licenses/icla.txt ? Once that's filed we can commit your patch, as it's a fairly small contribution I don't think a software grant is required. -Bertrand
Re: SlingMainServlet (almost) eats IOException, how to fix?
Wouldn't that be ClientAbortException: java.net.SocketException: Broken pipe -- Varun On Fri, Jul 31, 2015 at 11:39 AM, Carsten Ziegeler cziege...@apache.org wrote: I would assume that there is some subclass of IOException thrown in the cases where the client disconnects. So we could ignore just those? Carsten Am 30.07.15 um 17:58 schrieb Bertrand Delacretaz: Hi, Since SLING-3498 the SlingMainServlet.service method does this: try { ...do request processing } catch (IOException ioe) { log.debug(service: Probably client aborted request or any other network problem, ioe); } catch (Throwable T) { log.error(... The idea was to avoid polluting the logs with IOException caused by clients disconnecting prematurely or other network issues. The problem is that this causes legit IOExceptions throwed by request processing code to be logged at the debug level only, so effectively hidden on production systems. What do people think of changing that catch clause to } catch (IOException ioe) { log.error(service: IOException in request processing, ioe); I think a bit of noise in the logs is better than hiding exceptions thrown by application code. Any better ideas? -Bertrand -- Carsten Ziegeler Adobe Research Switzerland cziege...@apache.org
[jira] [Updated] (SLING-4897) Sling Web Console - Log Tail Plugin
[ https://issues.apache.org/jira/browse/SLING-4897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Varun Nagpal updated SLING-4897: Attachment: (was: sling-logtail.zip) Sling Web Console - Log Tail Plugin --- Key: SLING-4897 URL: https://issues.apache.org/jira/browse/SLING-4897 Project: Sling Issue Type: New Feature Components: Console Reporter: Varun Nagpal Labels: patch This issue tracks the introduction of a Log Tail Plugin for the Sling Log Web Console under /contrib As the name suggests, the plugin simulates the behaviour of the UNIX shell tail command and follows the server logs outputting on browser allowing for ease of log monitoring in remote systems. The plugin code depends on logback implementations and is sling independent currently. Relevant mail archive thread: http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html External github src link: https://github.com/vnagpal81/sling-logtail -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (SLING-4897) Sling Web Console - Log Tail Plugin
[ https://issues.apache.org/jira/browse/SLING-4897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Varun Nagpal updated SLING-4897: Attachment: sling-logtail.zip Sling Web Console - Log Tail Plugin --- Key: SLING-4897 URL: https://issues.apache.org/jira/browse/SLING-4897 Project: Sling Issue Type: New Feature Components: Console Reporter: Varun Nagpal Labels: patch Attachments: sling-logtail.zip This issue tracks the introduction of a Log Tail Plugin for the Sling Log Web Console under /contrib As the name suggests, the plugin simulates the behaviour of the UNIX shell tail command and follows the server logs outputting on browser allowing for ease of log monitoring in remote systems. The plugin code depends on logback implementations and is sling independent currently. Relevant mail archive thread: http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html External github src link: https://github.com/vnagpal81/sling-logtail -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (SLING-4897) Sling Web Console - Log Tail Plugin
[ https://issues.apache.org/jira/browse/SLING-4897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14636949#comment-14636949 ] Varun Nagpal edited comment on SLING-4897 at 7/29/15 8:01 AM: -- Attached zip containing code {code} sling-logtail.zip {code} with md5sum {code} $ md5sum.exe sling-logtail.zip 69576a5b3155684659c1112eb8923274 *sling-logtail.zip {code} was (Author: vnagpal): Attached zip containing code {code} sling-logtail.zip {code} with md5sum {code} $ md5sum.exe sling-logtail.zip 6d14f2ef4748c00e63cbbaeda7224e3c *sling-logtail.zip {code} Sling Web Console - Log Tail Plugin --- Key: SLING-4897 URL: https://issues.apache.org/jira/browse/SLING-4897 Project: Sling Issue Type: New Feature Components: Console Reporter: Varun Nagpal Labels: patch Attachments: sling-logtail.zip This issue tracks the introduction of a Log Tail Plugin for the Sling Log Web Console under /contrib As the name suggests, the plugin simulates the behaviour of the UNIX shell tail command and follows the server logs outputting on browser allowing for ease of log monitoring in remote systems. The plugin code depends on logback implementations and is sling independent currently. Relevant mail archive thread: http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html External github src link: https://github.com/vnagpal81/sling-logtail -- This message was sent by Atlassian JIRA (v6.3.4#6332)
Re: [vote] Accept the contribution of Log Tail Plugin tracked in SLING-4897
Hi Robert, Fixed the issues related to AL headers and reattached the zip archive with new md5sum (69576a5b3155684659c1112eb8923274). Please have a look. Thanks. -- Varun On Fri, Jul 24, 2015 at 7:08 PM, Robert Munteanu romb...@apache.org wrote: On Wed, 2015-07-22 at 19:45 +0530, Varun Nagpal wrote: Hi, This thread is about voting for the acceptance of the Log Tail Plugin tracked in SLING-4897. An archive (sling-logtail.zip, md5sum 6d14f2ef4748c00e63cbbaeda7224e3c) containing the contribution is attached to SLING-4897 and otherwise available at [0]. With a rat check some files fail due to missing/unapproved licenses: Unapproved licenses: src/main/java/org/apache/sling/tail/impl/LogTailerWebConsolePlugin.jav a src/main/java/org/apache/sling/tail/LogFilter.java src/main/resources/libs/tail/css/tail.css src/main/resources/libs/tail/js/tail.js pom.xml To reproduce, change the parent pom version from 22 to 24 and run mvn verify This should be fixed before accepting the contribution. Thanks, Robert
Re: [contrib] Contribution to Sling Web Console - Log Tail Plugin
Hi Satya, Thanks for the feedback and trying out the plugin. It would help me debug if you can provide me with a public URL where I can access the Sling instance you are running. Also, which browser are you using? It could be a browser DOM size limitation though I doubt it, since it doesn't work even after a document redraw (page refresh) -- Varun On Wed, Jul 29, 2015 at 2:58 PM, Satya Deep Maheshwari connus...@gmail.com wrote: Hi Varun I tried the log tail plugin and it looks quite useful especially for viewing logs on remote servers. I encountered a problem with it though. I see that after a couple of hours or so, it stops following the tail. I see that it does keep sending the ajax requests to the server to get the logs and gets a correct response as well but the tail just stops updating. Not sure if this is related to the log file length or the browser display limitation. Even refreshing the page does not help in fetching the latest logs. On Wed, Jul 22, 2015 at 7:40 PM, Varun Nagpal varun.nag...@gmail.com wrote: Hi All, As referred earlier on [0] I have developed a web console plugin to tail the server side logs on the browser. The motive to develop this was to ease access to logs while debugging issues on remote set ups. Apart from a UI feature set similar to baretail [1], it has the ability to filter log output using complex grammar and extensible filters. Request the dev community to consider it for contribution. Thanks and Regards, Varun Nagpal [0] http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html [1] https://www.baremetalsoft.com/baretail/
[jira] [Created] (SLING-4897) Sling Web Console - Log Tail Plugin
Varun Nagpal created SLING-4897: --- Summary: Sling Web Console - Log Tail Plugin Key: SLING-4897 URL: https://issues.apache.org/jira/browse/SLING-4897 Project: Sling Issue Type: New Feature Components: Console Reporter: Varun Nagpal This issue tracks the introduction of a Log Tail Plugin for the Sling Log Web Console. As the name suggests, the plugin simulates the behaviour of the UNIX shell tail command and follows the server logs outputting on browser allowing for ease of log monitoring in remote systems. The plugin code depends on logback implementations and is sling independent currently. Relevant mail archive thread: http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (SLING-4897) Sling Web Console - Log Tail Plugin
[ https://issues.apache.org/jira/browse/SLING-4897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Varun Nagpal updated SLING-4897: Description: This issue tracks the introduction of a Log Tail Plugin for the Sling Log Web Console under /contrib As the name suggests, the plugin simulates the behaviour of the UNIX shell tail command and follows the server logs outputting on browser allowing for ease of log monitoring in remote systems. The plugin code depends on logback implementations and is sling independent currently. Relevant mail archive thread: http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html External github src link: https://github.com/vnagpal81/sling-logtail was: This issue tracks the introduction of a Log Tail Plugin for the Sling Log Web Console. As the name suggests, the plugin simulates the behaviour of the UNIX shell tail command and follows the server logs outputting on browser allowing for ease of log monitoring in remote systems. The plugin code depends on logback implementations and is sling independent currently. Relevant mail archive thread: http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html Sling Web Console - Log Tail Plugin --- Key: SLING-4897 URL: https://issues.apache.org/jira/browse/SLING-4897 Project: Sling Issue Type: New Feature Components: Console Reporter: Varun Nagpal Labels: patch This issue tracks the introduction of a Log Tail Plugin for the Sling Log Web Console under /contrib As the name suggests, the plugin simulates the behaviour of the UNIX shell tail command and follows the server logs outputting on browser allowing for ease of log monitoring in remote systems. The plugin code depends on logback implementations and is sling independent currently. Relevant mail archive thread: http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html External github src link: https://github.com/vnagpal81/sling-logtail -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (SLING-4897) Sling Web Console - Log Tail Plugin
[ https://issues.apache.org/jira/browse/SLING-4897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Varun Nagpal updated SLING-4897: Attachment: sling-logtail.zip Attached zip containing code {code} sling-logtail.zip {code} with md5sum {code} $ md5sum.exe sling-logtail.zip 6d14f2ef4748c00e63cbbaeda7224e3c *sling-logtail.zip {code} Sling Web Console - Log Tail Plugin --- Key: SLING-4897 URL: https://issues.apache.org/jira/browse/SLING-4897 Project: Sling Issue Type: New Feature Components: Console Reporter: Varun Nagpal Labels: patch Attachments: sling-logtail.zip This issue tracks the introduction of a Log Tail Plugin for the Sling Log Web Console under /contrib As the name suggests, the plugin simulates the behaviour of the UNIX shell tail command and follows the server logs outputting on browser allowing for ease of log monitoring in remote systems. The plugin code depends on logback implementations and is sling independent currently. Relevant mail archive thread: http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html External github src link: https://github.com/vnagpal81/sling-logtail -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[contrib] Contribution to Sling Web Console - Log Tail Plugin
Hi All, As referred earlier on [0] I have developed a web console plugin to tail the server side logs on the browser. The motive to develop this was to ease access to logs while debugging issues on remote set ups. Apart from a UI feature set similar to baretail [1], it has the ability to filter log output using complex grammar and extensible filters. Request the dev community to consider it for contribution. Thanks and Regards, Varun Nagpal [0] http://apache-sling.73963.n3.nabble.com/Sling-Web-Console-Log-Tail-Plugin-td4050756.html [1] https://www.baremetalsoft.com/baretail/
[vote] Accept the contribution of Log Tail Plugin tracked in SLING-4897
Hi, This thread is about voting for the acceptance of the Log Tail Plugin tracked in SLING-4897. An archive (sling-logtail.zip, md5sum 6d14f2ef4748c00e63cbbaeda7224e3c) containing the contribution is attached to SLING-4897 and otherwise available at [0]. Please cast your votes. Thanks and Regards, Varun Nagpal [0] https://github.com/vnagpal81/sling-logtail
Re: Sling Web Console - Log Tail Plugin
Hi, Apologies for a (very) late response. As suggested by Justin and Robert, I have removed the dependency on ${sling.home}/logs/ and instead am using the Appender info in Logback Context to get the list of log files. Please have a look @ https://github.com/vnagpal81/sling-logtail Thanks. -- Varun On Fri, May 8, 2015 at 4:53 PM, Robert Munteanu romb...@apache.org wrote: On Fri, May 8, 2015 at 2:17 PM, Chetan Mehrotra chetan.mehro...@gmail.com wrote: On Fri, May 8, 2015 at 4:27 PM, Justin Edelson jus...@justinedelson.com wrote: I like the idea here, but binding this to the assumption that log files are stored relative to the sling home directory isn't a safe assumption. Can't this be written using the Logback API and avoid reading files at all? I.e. Just have log entries stored in an in-memory buffer. That would be risky as often while debugging lots of logs gets generated. As a user I would typically redirect all the interesting logs to a specific file and then have this tailer tail that. At some point we can provide an option to scroll also, just like in Jenkins UI where you can access older build logs also But we could query the logback config and find out the defined log files, right? The only thing that stands out for me right now is the fact that we always look for log files under ${sling.home}/logs . Robert
[jira] [Commented] (SLING-4849) Create Metrics instumentation bundle using ASM.
[ https://issues.apache.org/jira/browse/SLING-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14614957#comment-14614957 ] Varun Nagpal commented on SLING-4849: - Ah! That would need a byte code manipulation at run time. Now I get it. Thanks for explaining. I have used BTrace for runtime bytecode manipulation though - https://kenai.com/projects/btrace Create Metrics instumentation bundle using ASM. --- Key: SLING-4849 URL: https://issues.apache.org/jira/browse/SLING-4849 Project: Sling Issue Type: Improvement Components: Extensions Reporter: Ian Boston Assignee: Ian Boston Attachments: Screen Shot 2015-07-02 at 12.24.01.png, Screen Shot 2015-07-02 at 12.24.18.png, Screen Shot 2015-07-02 at 12.24.27.png Aim: To enable metrics for any method call in a Sling JVM without requiring any code changes to existing bundles. Method: OSGi 4.3 has a WeavingHook which is allows a byte code generator to get in between the classloader and classloading. Using ASM it should be possible to write code that enhances the byte code of any class to wrap method calls in calls to the Dropwizard Metrics library. This should work without any changes to the startup. The only requirement is the bundle is loaded before the classloader loads the classes that need to be instrumented. Quick tests indicate the method works and adds no more than 10 byte code instructions to a method. It may be possible to reduce that further. Instrumentation will be controlled by configuration, so classes that are not instrumented are not modified at all when loading. The metrics once available can be pushed into Graphite, Kibana or some other collection service. Dumped to a file periodically or exposed in JMX as counters. Will work in a branch on github initially. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-4849) Create Metrics instumentation bundle using ASM.
[ https://issues.apache.org/jira/browse/SLING-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14611624#comment-14611624 ] Varun Nagpal commented on SLING-4849: - I have implemented a Probe Profiler which leverages EventHook and FindHook in OSGi. Please have a look. https://github.com/vnagpal81/monitoring/blob/master/src/main/java/com/adobe/aod/monitoring/api/task/ProbeTask.java Have not yet established the performance metrics of this method. Create Metrics instumentation bundle using ASM. --- Key: SLING-4849 URL: https://issues.apache.org/jira/browse/SLING-4849 Project: Sling Issue Type: Improvement Components: Extensions Reporter: Ian Boston Assignee: Ian Boston Aim: To enable metrics for any method call in a Sling JVM without requiring any code changes to existing bundles. Method: OSGi 4.3 has a WeavingHook which is allows a byte code generator to get in between the classloader and classloading. Using ASM it should be possible to write code that enhances the byte code of any class to wrap method calls in calls to the Dropwizard Metrics library. This should work without any changes to the startup. The only requirement is the bundle is loaded before the classloader loads the classes that need to be instrumented. Quick tests indicate the method works and adds no more than 10 byte code instructions to a method. It may be possible to reduce that further. Instrumentation will be controlled by configuration, so classes that are not instrumented are not modified at all when loading. The metrics once available can be pushed into Graphite, Kibana or some other collection service. Dumped to a file periodically or exposed in JMX as counters. Will work in a branch on github initially. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-4849) Create Metrics instumentation bundle using ASM.
[ https://issues.apache.org/jira/browse/SLING-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14611808#comment-14611808 ] Varun Nagpal commented on SLING-4849: - EventHook will register a proxy service ProxyFooImpl for the interface Foo against which the service FooImpl was registered. Now, whenever Foo.method() is called ProxyFooImpl will be invoked instead of FooImpl which can log the time, count, etc. other metrics for service usage Create Metrics instumentation bundle using ASM. --- Key: SLING-4849 URL: https://issues.apache.org/jira/browse/SLING-4849 Project: Sling Issue Type: Improvement Components: Extensions Reporter: Ian Boston Assignee: Ian Boston Aim: To enable metrics for any method call in a Sling JVM without requiring any code changes to existing bundles. Method: OSGi 4.3 has a WeavingHook which is allows a byte code generator to get in between the classloader and classloading. Using ASM it should be possible to write code that enhances the byte code of any class to wrap method calls in calls to the Dropwizard Metrics library. This should work without any changes to the startup. The only requirement is the bundle is loaded before the classloader loads the classes that need to be instrumented. Quick tests indicate the method works and adds no more than 10 byte code instructions to a method. It may be possible to reduce that further. Instrumentation will be controlled by configuration, so classes that are not instrumented are not modified at all when loading. The metrics once available can be pushed into Graphite, Kibana or some other collection service. Dumped to a file periodically or exposed in JMX as counters. Will work in a branch on github initially. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
Sling Web Console - Log Tail Plugin
Hi All, I have implemented a Sling Web Console to tail the sling log files. Please have a look at source code [0] A screen shot of the plugin UI is attached. Feedback most welcome. Thanks. -- Varun [0] https://github.com/vnagpal81/sling-logtail
[jira] [Created] (SLING-4047) Unable to schedule jobs using JobManager
Varun Nagpal created SLING-4047: --- Summary: Unable to schedule jobs using JobManager Key: SLING-4047 URL: https://issues.apache.org/jira/browse/SLING-4047 Project: Sling Issue Type: Bug Components: Engine Affects Versions: Event 3.3.14 Reporter: Varun Nagpal Priority: Blocker Fix For: Event 3.3.16 I am unable to schedule Sling jobs using jobManager.createJob(topic).schedule().cron(cronExp).add() Getting the following exception in logs {quote} java.lang.NoClassDefFoundError: org/quartz/ValueSet at org.quartz.CronExpression.getValue(CronExpression.java:1121) at org.quartz.CronExpression.storeExpressionVals(CronExpression.java:699) at org.quartz.CronExpression.buildExpression(CronExpression.java:487) at org.quartz.CronExpression.init(CronExpression.java:276) at org.apache.sling.event.impl.support.ScheduleInfoImpl.check(ScheduleInfoImpl.java:304) at org.apache.sling.event.impl.jobs.JobManagerImpl.addScheduledJob(JobManagerImpl.java:1597) at org.apache.sling.event.impl.jobs.JobBuilderImpl$ScheduleBuilderImpl.add(JobBuilderImpl.java:135) at org.apache.sling.event.impl.jobs.JobBuilderImpl$ScheduleBuilderImpl.add(JobBuilderImpl.java:130) {quote} -- This message was sent by Atlassian JIRA (v6.3.4#6332)