Skip to content

com.logicmonitor.otel-resource 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>otel-resource</artifactId>
  <version>0.0.4-alpha</version>
</dependency>
Install 2/2: Run via command line
$ mvn install

About this package

Otel-resource detection

This Package is for resource detection. For the attributes which are not detected by Opentelemetry cloud provider extensions, we have custom resource providers for each cloud service and those providers will detect missing attributes.

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>otel-resource</artifactId>
  <version>0.0.4-alpha</version>
</dependency>

Step 2: Configure Maven to use Github repository

<repositories>
  <repository>
    <id>otel-resource</id>
    <name>LogicMonitor Otel Resource 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:otel-resource:0.0.4-alpha'
}