Skip to content

com.logicmonitor.lm-telemetry-sdk 0.0.4-alpha Latest version

Install 1/2: Add this to pom.xml:
Learn more about Maven or Gradle
<dependency>
  <groupId>com.logicmonitor</groupId>
  <artifactId>lm-telemetry-sdk</artifactId>
  <version>0.0.4-alpha</version>
</dependency>
Install 2/2: Run via command line
$ mvn install

About this package

LM Telemetry SDK Java

LM Telemetry SDK java is a wrapper around OpenTelemetry SDK. If you are using LM Telemetry SDK in the application then no need to add OpenTelemetry SDK dependency as it is fetched transitively.

This SDK currently detects Resources on the platforms like

  • AWS Elastic Compute Cloud
  • AWS Lambda
  • Azure VM
  • Google Cloud Compute Engine (GCE)

Prerequisites

This package is published on GitHub, you need to follow certain steps to fetch/install this. Please follow these steps to setup your project and use this package as a dependency.

Setup a GitHub Personal Access Token

Generate a personal access token for your github account with repo and read:packages scope.
Follow these steps.

Maven

Step 1: Add Dependency in pom.xml

<dependency>
  <groupId>com.logicmonitor</groupId>
  <artifactId>lm-telemetry-sdk</artifactId>
  <version>0.0.4-alpha</version>
</dependency>

Step 2: Configure Maven to use Github repository

<repositories>
  <repository>
    <id>lm-github-repository</id>
    <name>LogicMonitor Telemetry SDK Repository</name>
    <url>https://maven.pkg.github.com/logicmonitor/lm-telemetry-sdk-java</url>
  </repository>
</repositories>

Step 3: Add authentication details for repository in USER_HOME/.m2/settings.xml

<servers>
  <server>
    <id>lm-github-repository</id>
    <username>github_username</username>
    <password>github_token</password>
  </server>
</servers>

Gradle

Step 1: In build.gradle, specify below Respository block:

repositories {
    maven {
        credentials {
            username = System.getenv("GITHUB_USERNAME")
            password = System.getenv("GITHUB_TOKEN")
        }
        url "https://maven.pkg.github.com/logicmonitor/lm-telemetry-sdk-java"
    }
    mavenCentral()
}

Set your GITHUB_USERNAME and GITHUB_TOKEN as environment variable.

Step 2: Provide the dependency:

dependencies {
  implementation 'com.logicmonitor:lm-telemetry-sdk:0.0.4-alpha'
}

Usage Example:

Java Manual Instrumentation