Giter Club home page Giter Club logo

Comments (9)

theletterf avatar theletterf commented on June 24, 2024

@garydgregory What's your runtime and OS?

+CC @open-telemetry/java-instrumentation-maintainers

from opentelemetry.io.

laurit avatar laurit commented on June 24, 2024

https://github.com/open-telemetry/opentelemetry.io/blob/807fd51093c8ee6b156010ae0c9a70d06cf4d150/content/en/docs/languages/java/instrumentation.md seems to have a similar sample. That sample uses ResourceAttributes.SERVICE_NAME instead of SERVICE_NAME also the import for ResourceAttributes is different.

from opentelemetry.io.

garydgregory avatar garydgregory commented on June 24, 2024

I am using Java 17 on Windows 10 with Maven:

ver && java -version && mvn -version

Microsoft Windows [Version 10.0.19045.4170]
openjdk version "17.0.8" 2023-07-18
OpenJDK Runtime Environment Temurin-17.0.8+7 (build 17.0.8+7)
OpenJDK 64-Bit Server VM Temurin-17.0.8+7 (build 17.0.8+7, mixed mode, sharing)
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: C:\java\apache-maven-3.9.6
Java version: 17.0.8, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-17.0.8.7-hotspot
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

My IDE is Eclipse:

Version: 2024-03 (4.31.0)

This includes Buildship (the Gradle thing that does not really work, see eclipse/buildship#1303)

from opentelemetry.io.

garydgregory avatar garydgregory commented on June 24, 2024

Both ResourceAttributes.SERVICE_NAME and ResourceAttributes.SERVICE_VERSION are deprecated, so what's supposed to go in these put calls?

from opentelemetry.io.

laurit avatar laurit commented on June 24, 2024

@garydgregory with the latest semconv artifact it is io.opentelemetry.semconv.ServiceAttributes.SERVICE_NAME

from opentelemetry.io.

garydgregory avatar garydgregory commented on June 24, 2024

Hello @laurit
My dependency management section uses:

      <dependency>
        <groupId>io.opentelemetry</groupId>
        <artifactId>opentelemetry-bom</artifactId>
        <version>1.37.0</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>      

Version "1.37.0" looks like the latest: https://search.maven.org/artifact/io.opentelemetry/opentelemetry-bom

My dependency section uses:

    <dependency>
      <groupId>io.opentelemetry.instrumentation</groupId>
      <artifactId>opentelemetry-log4j-appender-2.17</artifactId>
      <version>2.3.0-alpha</version>
    </dependency>
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-exporter-otlp</artifactId>
    </dependency>

mvn dependency:tree says:

[INFO] +- io.opentelemetry.instrumentation:opentelemetry-log4j-appender-2.17:jar:2.3.0-alpha:compile
[INFO] |  +- io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:jar:2.3.0:compile
[INFO] |  |  +- io.opentelemetry:opentelemetry-api-incubator:jar:1.37.0-alpha:runtime
[INFO] |  |  +- io.opentelemetry.semconv:opentelemetry-semconv:jar:1.25.0-alpha:compile
[INFO] |  |  \- io.opentelemetry.semconv:opentelemetry-semconv-incubating:jar:1.25.0-alpha:compile
[INFO] |  +- io.opentelemetry.instrumentation:opentelemetry-instrumentation-api-incubator:jar:2.3.0-alpha:compile
[INFO] |  \- io.opentelemetry:opentelemetry-api:jar:1.37.0:compile
[INFO] |     \- io.opentelemetry:opentelemetry-context:jar:1.37.0:compile
[INFO] \- io.opentelemetry:opentelemetry-exporter-otlp:jar:1.37.0:compile
[INFO]    +- io.opentelemetry:opentelemetry-sdk-trace:jar:1.37.0:compile
[INFO]    |  \- io.opentelemetry:opentelemetry-sdk-common:jar:1.37.0:compile
[INFO]    +- io.opentelemetry:opentelemetry-sdk-metrics:jar:1.37.0:compile
[INFO]    +- io.opentelemetry:opentelemetry-sdk-logs:jar:1.37.0:compile
[INFO]    +- io.opentelemetry:opentelemetry-exporter-otlp-common:jar:1.37.0:runtime
[INFO]    |  \- io.opentelemetry:opentelemetry-exporter-common:jar:1.37.0:runtime
[INFO]    +- io.opentelemetry:opentelemetry-exporter-sender-okhttp:jar:1.37.0:runtime
[INFO]    |  \- com.squareup.okhttp3:okhttp:jar:4.12.0:runtime
[INFO]    |     +- com.squareup.okio:okio:jar:3.6.0:runtime
[INFO]    |     |  \- com.squareup.okio:okio-jvm:jar:3.6.0:runtime
[INFO]    |     |     \- org.jetbrains.kotlin:kotlin-stdlib-common:jar:1.9.10:runtime
[INFO]    |     \- org.jetbrains.kotlin:kotlin-stdlib-jdk8:jar:1.8.21:runtime
[INFO]    |        +- org.jetbrains.kotlin:kotlin-stdlib:jar:1.8.21:runtime
[INFO]    |        \- org.jetbrains.kotlin:kotlin-stdlib-jdk7:jar:1.8.21:runtime
[INFO]    \- io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:jar:1.37.0:runtime
[INFO]       \- io.opentelemetry:opentelemetry-sdk:jar:1.37.0:runtime

The class is in opentelemetry-semconv-1.25.0-alpha.jar which is the latest according to https://search.maven.org/artifact/io.opentelemetry.semconv/opentelemetry-semconv

What am I missing?

TY.

from opentelemetry.io.

laurit avatar laurit commented on June 24, 2024

@garydgregory what is the issue that you have?

from opentelemetry.io.

garydgregory avatar garydgregory commented on June 24, 2024

Hello @laurit

  1. Like the title of the ticket says "Exporters example does not compile", so that needs fixing.
  2. The offered solution uses deprecate code, so what's the supported code supposed to look like?

from opentelemetry.io.

svrnm avatar svrnm commented on June 24, 2024

@open-telemetry/java-approvers PTAL

from opentelemetry.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.