 Apache Karaf Decanter 2.x - Documentationmeaning that you can simple add your metrics to the Decanter Prometheus servlet. You just have to import io.prometheus* packages and simple use the regular Prometheus code: Apache Karaf Decanter 2.x - Your code here. inprogressRequests.dec(); } } Don’t forget to import io.prometheus* packages in your bundle MANIFEST.MF: Import-Package: io.prometheus.client;version="[0.8,1)" That’s the only thing karaf.decanter.sample.collector; import org.osgi.framework.SynchronousBundleListener; import org.osgi.service.event.EventAdmin; import org.osgi.service.event.Event; import java.util.HashMap; public class0 码力 | 64 页 | 812.01 KB | 1 年前3 Apache Karaf Decanter 2.x - Documentationmeaning that you can simple add your metrics to the Decanter Prometheus servlet. You just have to import io.prometheus* packages and simple use the regular Prometheus code: Apache Karaf Decanter 2.x - Your code here. inprogressRequests.dec(); } } Don’t forget to import io.prometheus* packages in your bundle MANIFEST.MF: Import-Package: io.prometheus.client;version="[0.8,1)" That’s the only thing karaf.decanter.sample.collector; import org.osgi.framework.SynchronousBundleListener; import org.osgi.service.event.EventAdmin; import org.osgi.service.event.Event; import java.util.HashMap; public class0 码力 | 64 页 | 812.01 KB | 1 年前3
 Apache Karaf Decanter 1.x - Documentationkaraf.decanter.sample.collector; import org.osgi.framework.SynchronousBundleListener; import org.osgi.service.event.EventAdmin; import org.osgi.service.event.Event; import java.util.HashMap; public class collector; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.framework.ServiceRegistration; import org.osgi.service service.event.EventAdmin; import org.osgi.util.tracker.ServiceTracker; public class Activator implements BundleActivator { private BundleCollector collector; public void start(final BundleContext bundleContext)0 码力 | 67 页 | 213.16 KB | 1 年前3 Apache Karaf Decanter 1.x - Documentationkaraf.decanter.sample.collector; import org.osgi.framework.SynchronousBundleListener; import org.osgi.service.event.EventAdmin; import org.osgi.service.event.Event; import java.util.HashMap; public class collector; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceReference; import org.osgi.framework.ServiceRegistration; import org.osgi.service service.event.EventAdmin; import org.osgi.util.tracker.ServiceTracker; public class Activator implements BundleActivator { private BundleCollector collector; public void start(final BundleContext bundleContext)0 码力 | 67 页 | 213.16 KB | 1 年前3
 Apache Karaf 3.0.5 Guideskaraf@root()> bundle karaf@root(bundle)> Apache Karaf 3.0.5 Guideskaraf@root()> bundle karaf@root(bundle)>- karaf@root(bundle)> capabilities classes diag dynamic-import find-class headers info install list refresh requirements resolve restart services start start-level (version>=7.0.0))) DYNAMIC IMPORT The bundle:dynamic-import command allows you to enable or disable the dynamic import of a given bundle: karaf@root()> bundle:dynamic-import 77 Enabling dynamic imports imports on bundle org.apache.karaf.config.core [77] The purpose of dynamic import is to allow a bundle to be wired up to packages that may not be knwon about in advance. DEVELOPER COMMANDS 91 When a class 0 码力 | 203 页 | 534.36 KB | 1 年前3
 Apache Karaf Container 4.x - Documentationpackages 5. Developer Guide 5.1. Developer commands 5.1.1. Dump 5.1.2. Diagnostic 5.1.3. Dynamic import 5.1.4. OSGi framework 5.1.5. Stack traces printout 5.1.6. Bundle tree 5.1.7. Watch 5.2. Scripting "/opt/karaf-4/bin/contrib/karaf-4.xml" $ svccfg validate /opt/karaf-4/bin/contrib/karaf-4.xml $ svccfg import /opt/karaf-4/bin/contrib/karaf-4.xml NOTE The generated SMF descriptor is defined as transient Displays diagnostic information why a bundle is not Active bundle:dynamic-import Enables/disables dynamic-import for a given bundle. bundle:find-class Locates a specified class0 码力 | 370 页 | 1.03 MB | 1 年前3 Apache Karaf Container 4.x - Documentationpackages 5. Developer Guide 5.1. Developer commands 5.1.1. Dump 5.1.2. Diagnostic 5.1.3. Dynamic import 5.1.4. OSGi framework 5.1.5. Stack traces printout 5.1.6. Bundle tree 5.1.7. Watch 5.2. Scripting "/opt/karaf-4/bin/contrib/karaf-4.xml" $ svccfg validate /opt/karaf-4/bin/contrib/karaf-4.xml $ svccfg import /opt/karaf-4/bin/contrib/karaf-4.xml NOTE The generated SMF descriptor is defined as transient Displays diagnostic information why a bundle is not Active bundle:dynamic-import Enables/disables dynamic-import for a given bundle. bundle:find-class Locates a specified class0 码力 | 370 页 | 1.03 MB | 1 年前3
共 4 条
- 1













