public void error(String err) { if (ctx.error == 0) { ctx.error = DataProxy.sendError(err); } }
public final static synchronized UDPDataSendThread getInstance() { if (instance == null) { instance = new UDPDataSendThread(); instance.setDaemon(true); instance.setName(ThreadUtil.getName(instance)); instance.start(); } return instance; }
@RequestHandler(RequestCmd.OBJECT_RESET_CACHE) public Pack getAgentCacheReseto(Pack param) { DataProxy.reset(); return param; }
public static int sendSqlText(String sql) { int hash = getSqlHash(sql); if (sqlText.contains(hash)) { return hash; } sqlText.put(hash); // udp.add(new TextPack(TextTypes.SQL, hash, sql)); sendDirect(new TextPack(TextTypes.SQL, hash, sql)); return hash; } private static IntLinkedSet serviceName = new IntLinkedSet().setMax(10000);
public static void send(SummaryPack p) { p.objHash = conf.getObjHash(); p.objType = conf.obj_type; sendDirect(p); } static DataUdpAgent udpNet = DataUdpAgent.getInstance();
public static int sendServiceName(String service) { int hash = HashUtil.hash(service); sendServiceName(hash,service); return hash; } public static void sendServiceName(int hash, String service) {
public static int sendObjName(String objName) { int hash = HashUtil.hash(objName); sendObjName(hash,objName); return hash; } public static void sendObjName(int hash, String objName) {
/** * (syn: addStep) * assign a given step to steps[pos++] * @param stepSingle */ protected void process(StepSingle stepSingle) { checkDumpStep(); steps[pos++] = stepSingle; if (pos >= steps.length) { Step[] o = steps; steps = new Step[conf.profile_step_max_count]; pos = 0; DataProxy.sendProfile(o, context); } }
public static void sendServiceName(int hash, String service) { if (serviceName.contains(hash)) { return ; } serviceName.put(hash); udpCollect.add(new TextPack(TextTypes.SERVICE, hash, service)); } private static IntLinkedSet objNameSet = new IntLinkedSet().setMax(10000);
public final static synchronized UDPDataSendThread getInstance() { if (instance == null) { instance = new UDPDataSendThread(); instance.setDaemon(true); instance.setName(ThreadUtil.getName(instance)); instance.start(); } return instance; }
public static void send(SummaryPack p) { p.objHash = conf.getObjHash(); p.objType = conf.obj_type; sendDirect(p); } static DataUdpAgent udpNet = DataUdpAgent.getInstance();
@RequestHandler(RequestCmd.OBJECT_RESET_CACHE) public Pack getAgentCacheReseto(Pack param) { DataProxy.reset(); return param; }
public void error(String err) { if (ctx.error == 0) { ctx.error = DataProxy.sendError(err); } }
public static int sendServiceName(String service) { int hash = HashUtil.hash(service); sendServiceName(hash,service); return hash; } public static void sendServiceName(int hash, String service) {
public static int sendObjName(String objName) { int hash = HashUtil.hash(objName); sendObjName(hash,objName); return hash; } public static void sendObjName(int hash, String objName) {
/** * (syn: addStep) * assign a given step to steps[pos++] * @param stepSingle */ protected void process(StepSingle stepSingle) { checkDumpStep(); steps[pos++] = stepSingle; if (pos >= steps.length) { Step[] o = steps; steps = new Step[conf.profile_step_max_count]; pos = 0; DataProxy.sendProfile(o, context); } }
public static void sendServiceName(int hash, String service) { if (serviceName.contains(hash)) { return ; } serviceName.put(hash); udpCollect.add(new TextPack(TextTypes.SERVICE, hash, service)); } private static IntLinkedSet objNameSet = new IntLinkedSet().setMax(10000);
public static void sendAlert(byte level, String title, String message, MapValue tags) { AlertPack p = new AlertPack(); p.objType = conf.obj_type; p.objHash = conf.getObjHash(); p.level = level; p.title = title; p.message = message; if (tags != null) { p.tags = tags; } sendDirect(p); }
public static void serviceError(String emsg) { TraceContext ctx = TraceContextManager.getContext(); if (ctx != null && ctx.error != 0) { // already started ctx.error = DataProxy.sendError(emsg); } }
public static void serviceError(String emsg) { TraceContext ctx = TraceContextManager.getContext(); if (ctx != null && ctx.error != 0) { // already started ctx.error = DataProxy.sendError(emsg); } }