OpenTelemetry Java SDK
Go to file
John Watson c4791e9fbb
Very basic Aggregation-configuration API in the SDK. (#2037)
CHANGELOG: SDK : Enhancement: A basic aggregation configuration API has been added to the SDK's meter provider implementation.

* Create a very basic view API in the SDK.

* fix formatting

* move the ViewRegistry up one package, and clean up the visibility of other classes

* Support matching by instrument name

* Update sdk/src/main/java/io/opentelemetry/sdk/metrics/ViewRegistry.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/src/main/java/io/opentelemetry/sdk/metrics/view/ViewSpecification.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/src/main/java/io/opentelemetry/sdk/metrics/view/ViewSpecification.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/src/main/java/io/opentelemetry/sdk/metrics/view/ViewSpecification.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/src/main/java/io/opentelemetry/sdk/metrics/view/ViewSpecification.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* fix formatting issues from GH

* small renaming to a big name

* small renaming to a big name

* re-order matching check and fix a merge issue

* Update from upstream changes.

* Update from upstream changes.

* Adjust defaults based on the latest behavior

* refactor before writing tests

* tests for the AggregationChooser and a bugfix they uncovered

* tests for the ViewRegistry

* Javadoc for the AggregationConfiguration

* Add more javadoc.

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/Batcher.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/AggregationConfiguration.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/AggregationConfiguration.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/InstrumentSelector.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/InstrumentSelector.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/src/main/java/io/opentelemetry/sdk/metrics/view/AggregationConfiguration.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/src/main/java/io/opentelemetry/sdk/metrics/view/AggregationConfiguration.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/AggregationConfiguration.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/InstrumentSelector.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/InstrumentSelector.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/InstrumentSelector.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/InstrumentSelector.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/InstrumentSelector.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/InstrumentSelector.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>

* fix formatting issues

* Update sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/view/InstrumentSelector.java

Co-authored-by: Anuraag Agrawal <anuraaga@gmail.com>
2020-11-18 13:05:37 -08:00
.github Disable javadoc task for kotlin project since there isn't any. And have CI build instead of check. (#2074) 2020-11-13 08:34:12 -08:00
all Rename the package for WithSpan annotation (#2090) 2020-11-18 08:56:44 -08:00
api Ignore invalid usage of TraceState instead of throwing. (#2084) 2020-11-18 09:22:24 -08:00
bom Don't set packaging type explicitly since Gradle determines it automatically, set description for BOM project, and remove outdated bom publication configuration (#1758) 2020-10-06 08:40:09 +09:00
buildscripts Move semantic conventions script to buildscripts (#1998) 2020-11-04 08:30:23 -08:00
context Merge pull request #2066 2020-11-13 12:25:12 +09:00
docs Remove getCurrentContext and withSpan from Tracer (#1809) 2020-10-15 10:58:41 -07:00
examples Update the examples for v0.10.0 (#2030) 2020-11-05 16:32:58 -08:00
exporters Some cleanup in span land. (#2062) 2020-11-11 18:34:07 -08:00
extensions Rename the package for WithSpan annotation (#2090) 2020-11-18 08:56:44 -08:00
gradle/wrapper Upgrade to Gradle 6.7 and use toolchains feature to build on 11 and t… (#1829) 2020-10-21 15:01:50 +09:00
integration-tests remove the enable.docker.tests gradle property since TestContainers handles it now (#2028) 2020-11-06 13:48:40 +09:00
opencensus-shim Move builders to top level. (#1958) 2020-11-10 14:50:37 +09:00
opentracing-shim Some cleanup in span land. (#2062) 2020-11-11 18:34:07 -08:00
perf-harness Remove inmemory exporter artifact, move to sdk-testing (#1991) 2020-11-04 08:18:01 -08:00
proto Switch animal sniffer signature to gummy bears. (#2015) 2020-11-06 08:56:26 +09:00
sdk Very basic Aggregation-configuration API in the SDK. (#2037) 2020-11-18 13:05:37 -08:00
sdk-extensions Some cleanup in span land. (#2062) 2020-11-11 18:34:07 -08:00
.codecov.yaml Require coverage 95% for api and sdk (#1252) 2020-05-20 11:40:45 -07:00
.editorconfig Disable inner class imports to avoid errorprone BadImport error (#1883) 2020-10-26 09:56:02 -07:00
.gitattributes Add .gitattributes. (#1798) 2020-10-15 16:03:55 -07:00
.gitignore Add .editorconfig file with google-java-format compatible options (#1136) 2020-04-27 08:42:59 -07:00
.gitmodules Set proto submodule to upstream repository (#514) 2019-08-29 09:25:08 -07:00
CHANGELOG.md add a changelog entry for the kotlin extension (#2079) 2020-11-15 15:59:02 +09:00
CONTRIBUTING.md remove the enable.docker.tests gradle property since TestContainers handles it now (#2028) 2020-11-06 13:48:40 +09:00
LICENSE Initial commit 2019-02-26 08:43:37 -08:00
QUICKSTART.md Update the QUICKSTART.md for the 0.10.0 release. (#2048) 2020-11-09 18:27:54 -08:00
README.md Push README updates. (#2024) 2020-11-05 16:03:42 +01:00
RELEASING.md Add GitHub workflows to automate releases (#1781) 2020-10-13 15:21:42 +09:00
build.gradle Add an error message to better explain Java 11+ build requirement (#2081) 2020-11-18 12:53:07 -08:00
gradle.properties Merge pull request #2066 2020-11-13 12:25:12 +09:00
gradlew Update Gradle Wrapper to 6.6 (#1529) 2020-08-11 08:01:14 -07:00
gradlew.bat Add .gitattributes. (#1798) 2020-10-15 16:03:55 -07:00
settings.gradle Rename the package for WithSpan annotation (#2090) 2020-11-18 08:56:44 -08:00

README.md

OpenTelemetry

Gitter chat Continuous Build Coverage Status Maven Central

We hold regular meetings. See details at community page.

Overview

OpenTelemetry is the merging of OpenCensus and OpenTracing into one project.

This project contains the following top level components:

  • OpenTelemetry API:
    • tracing api includes Tracer, Span and SpanContext.
    • baggage api defines a collection of entries in the form of key-value pairs of data that can be propagated to provide contextual information.
    • metrics api.
  • extensions define additional API extensions, which are not part of the core API.
  • sdk define the reference implementation complying to the OpenTelemetry API.
  • sdk-extensions define additional SDK extensions, which are not part of the core SDK.
  • OpenTracing shim defines a bridge layer from OpenTracing to the OpenTelemetry API.
  • examples on how to use the APIs, SDK, and standard exporters.

We would love to hear from the larger community: please provide feedback proactively.

Note about extensions

Both API and SDK extensions consist of various additional components which are excluded from the core artifacts to keep them from growing too large. We still aim to provide the same level of quality and guarantee for them as for the core components. Please don't hesitate to use them if you find them useful.

Project setup and contribute

Please refer to the contribution guide on how to setup and contribute!

Quick Start

Please refer to the quick start guide on how use the OpenTelemetry API.

Published Releases

Published releases are available on maven central.

Maven

  <dependencies>
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-api</artifactId>
      <version>0.10.0</version>
    </dependency>
  </dependencies>

Gradle

dependencies {
	implementation('io.opentelemetry:opentelemetry-api:0.10.0')
}

Snapshots

Snapshots based out the master branch are available for opentelemetry-api, opentelemetry-sdk and the rest of the artifacts:

Maven

  <repositories>
    <repository>
      <id>oss.sonatype.org-snapshot</id>
      <url>https://oss.jfrog.org/artifactory/oss-snapshot-local</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-api</artifactId>
      <version>0.11.0-SNAPSHOT</version>
    </dependency>
  </dependencies>

Gradle

repositories {
	maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' }
}

dependencies {
	implementation('io.opentelemetry:opentelemetry-api:0.11.0-SNAPSHOT')
}

Libraries will usually only need opentelemetry-api, while applications may want to use opentelemetry-sdk.

Releases

OpenTelemetry Java is under active development. Releases aren't guaranteed to conform to a specific version of the specification. Future releases will not attempt to maintain backwards compatibility with previous releases.

Check out information about the latest release.

This is a current feature status list:

Component Version
Tracing API v0.10.0
Tracing SDK v0.10.0
Metrics API v0.10.0
Metrics SDK v0.10.0
OTLP Exporter v0.10.0
Jaeger Trace Exporter v0.10.0
Zipkin Trace Exporter v0.10.0
Prometheus Metrics Exporter v0.10.0
Context Propagation v0.10.0
OpenTracing Bridge v0.10.0
OpenCensus Bridge N/A

See the project milestones for details on upcoming releases. The dates and features described in issues and milestones are estimates, and subject to change.

Summary

We plan to merge projects and pave the path for future improvements as a unified community of tracing vendors, users and library authors who wants apps be managed better. We are open to feedback and suggestions from all of you!

Contributing

See CONTRIBUTING.md

Approvers (@open-telemetry/java-approvers):

Find more about the approver role in community repository.

Maintainers (@open-telemetry/java-maintainers):

Find more about the maintainer role in community repository.

Thanks to all the people who have contributed

contributors