/** * Creates the influx {@link Builder} for the given data type. * * @param data * Data carrier * @return Builder that can be used to create influx Points. */ @Override public Collection<Builder> createBuilders(E data) { Builder builder = Point.measurement(getSeriesName()); builder.time(data.getTimeStamp().getTime(), TimeUnit.MILLISECONDS); this.addTags(data, builder); this.addFields(data, builder); return Collections.singletonList(builder); }
/** * {@inheritDoc} */ @Override protected void addTags(JmxSensorValueData data, Builder builder) { super.addTags(data, builder); JmxDefinitionDataIdent jmxDefinitionDataIdent = cachedDataService.getJmxDefinitionDataIdentForId(data.getJmxSensorDefinitionDataIdentId()); if (null != jmxDefinitionDataIdent) { builder.tag(Series.Jmx.TAG_JMX_ATTRIBUTE_FULL_NAME, jmxDefinitionDataIdent.getDerivedFullName()); } }
/** * {@inheritDoc} */ @Override protected void addTags(HttpTimerData data, Builder builder) { super.addTags(data, builder); HttpInfo httpInfo = data.getHttpInfo(); if (null != httpInfo.getUri()) { builder.tag(Series.Http.TAG_URI, httpInfo.getUri()); } if (httpInfo.hasInspectItTaggingHeader()) { builder.tag(Series.Http.TAG_INSPECTIT_TAGGING_HEADER, httpInfo.getInspectItTaggingHeaderValue()); } }
/** * {@inheritDoc} */ @Override protected void addTags(TimerData data, Builder builder) { super.addTags(data, builder); MethodIdent methodIdent = cachedDataService.getMethodIdentForId(data.getMethodIdent()); if (null != methodIdent) { builder.tag(Series.Methods.TAG_METHOD_NAME, methodIdent.getMethodName()); builder.tag(Series.Methods.TAG_CLASS_FQN, methodIdent.getFQN()); builder.tag(Series.Methods.TAG_METHOD_SIGNATURE, methodIdent.getFullyQualifiedMethodSignature()); } }
/** * {@inheritDoc} */ @Override protected void addTags(InvocationSequenceData data, Builder builder) { super.addTags(data, builder); String businessTxName = BusinessTransactionDefinition.UNKNOWN_BUSINESS_TX; String applicationName = ApplicationDefinition.UNKNOWN_APP; BusinessTransactionData businessTx = cachedDataService.getBusinessTransactionForId(data.getApplicationId(), data.getBusinessTransactionId()); if (null != businessTx) { businessTxName = businessTx.getName(); applicationName = businessTx.getApplication().getName(); } builder.tag(Series.BusinessTransaction.TAG_APPLICATION_NAME, applicationName); builder.tag(Series.BusinessTransaction.TAG_BUSINESS_TRANSACTION_NAME, businessTxName); }