Search in sources :

Example 6 with MessageData

use of com.microsoft.applicationinsights.agent.internal.exporter.models.MessageData in project ApplicationInsights-Java by microsoft.

the class ProfilerServiceInitializer method sendMessageTelemetry.

private static void sendMessageTelemetry(TelemetryClient telemetryClient, String message) {
    TelemetryItem telemetry = new TelemetryItem();
    MessageData data = new MessageData();
    telemetryClient.initMessageTelemetry(telemetry, data);
    data.setMessage(message);
    telemetry.setTime(FormattedTime.offSetDateTimeFromNow());
    telemetryClient.trackAsync(telemetry);
}
Also used : TelemetryItem(com.microsoft.applicationinsights.agent.internal.exporter.models.TelemetryItem) MessageData(com.microsoft.applicationinsights.agent.internal.exporter.models.MessageData)

Aggregations

MessageData (com.microsoft.applicationinsights.agent.internal.exporter.models.MessageData)6 TelemetryItem (com.microsoft.applicationinsights.agent.internal.exporter.models.TelemetryItem)5 AvailabilityData (com.microsoft.applicationinsights.agent.internal.exporter.models.AvailabilityData)1 MetricsData (com.microsoft.applicationinsights.agent.internal.exporter.models.MetricsData)1 PageViewData (com.microsoft.applicationinsights.agent.internal.exporter.models.PageViewData)1 PageViewPerfData (com.microsoft.applicationinsights.agent.internal.exporter.models.PageViewPerfData)1 RemoteDependencyData (com.microsoft.applicationinsights.agent.internal.exporter.models.RemoteDependencyData)1 RequestData (com.microsoft.applicationinsights.agent.internal.exporter.models.RequestData)1 TelemetryEventData (com.microsoft.applicationinsights.agent.internal.exporter.models.TelemetryEventData)1 TelemetryExceptionData (com.microsoft.applicationinsights.agent.internal.exporter.models.TelemetryExceptionData)1 Attributes (io.opentelemetry.api.common.Attributes)1 EventData (io.opentelemetry.sdk.trace.data.EventData)1 SemanticAttributes (io.opentelemetry.semconv.trace.attributes.SemanticAttributes)1 ThreadInfo (java.lang.management.ThreadInfo)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1