Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate opentelemetry-sdk-extension-aws #4749

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ dependency as follows, replacing `{{artifact-id}}` with the value from the "Arti
| [SDK Autoconfigure Extension](./sdk-extensions/autoconfigure) | Autoconfigure OpenTelemetry SDK from env vars, system properties, and SPI | `opentelemetry-sdk-extension-autoconfigure` | <!--VERSION_UNSTABLE-->1.18.0-alpha<!--/VERSION_UNSTABLE--> |
| [SDK Autoconfigure SPI](./sdk-extensions/autoconfigure-spi) | Service Provider Interface (SPI) definitions for autoconfigure | `opentelemetry-sdk-extension-autoconfigure-spi` | <!--VERSION_STABLE-->1.18.0<!--/VERSION_STABLE--> |
| [SDK Resources Extension](./sdk-extensions/resources) | Resource providers, including container, host, os, and process | `opentelemetry-sdk-extension-resources` | <!--VERSION_STABLE-->1.18.0<!--/VERSION_STABLE--> |
| [SDK AWS Extension](./sdk-extensions/aws) | AWS resource providers, including beanstalk, ec2, ecs, eks, and lambda | `opentelemetry-sdk-extension-aws` | <!--VERSION_STABLE-->1.18.0<!--/VERSION_STABLE--> |
| [SDK AWS Extension](./sdk-extensions/aws) | AWS resource providers, including beanstalk, ec2, ecs, eks, and lambda (deprecated) | `opentelemetry-sdk-extension-aws` | <!--VERSION_STABLE-->1.18.0<!--/VERSION_STABLE--> |
| [SDK Jaeger Remote Sampler Extension](./sdk-extensions/jaeger-remote-sampler) | Sampler which obtains sampling configuration from remote Jaeger server | `opentelemetry-sdk-extension-jaeger-remote-sampler` | <!--VERSION_STABLE-->1.18.0<!--/VERSION_STABLE--> |
| [SDK Incubator](./sdk-extensions/incubator) | SDK incubator, including YAML based view configuration, LeakDetectingSpanProcessor, and zPages | `opentelemetry-sdk-extension-incubator` | <!--VERSION_UNSTABLE-->1.18.0-alpha<!--/VERSION_UNSTABLE--> |

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
Comparing source compatibility of against
No changes.
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.BeanstalkResource (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.BeanstalkResourceProvider (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.Ec2Resource (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.Ec2ResourceProvider (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.EcsResource (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.EcsResourceProvider (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.EksResource (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.EksResourceProvider (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.LambdaResource (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
=== UNCHANGED CLASS: PUBLIC FINAL io.opentelemetry.sdk.extension.aws.resource.LambdaResourceProvider (not serializable)
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
+++ NEW ANNOTATION: java.lang.Deprecated
6 changes: 6 additions & 0 deletions sdk-extensions/aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

[![Javadocs][javadoc-image]][javadoc-url]

> **NOTICE**: This artifact is deprecated and its contents have been moved
> to [io.opentelemetry.contrib:opentelemetry-aws-resources](https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources).
> Version 1.19.0 will be the last minor version published. However, it will continue to receive
> patches for security vulnerabilities, and`io.opentelemetry:opentelemetry-bom` will reference the
> last published version.

---
#### Running micro-benchmarks
From the root of the repo run `./gradlew clean :opentelemetry-sdk-extension-aws:jmh` to run all the benchmarks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
/**
* A factory for a {@link Resource} which provides information about the current EC2 instance if
* running on AWS Elastic Beanstalk.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class BeanstalkResource {

private static final Logger logger = Logger.getLogger(BeanstalkResource.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider;
import io.opentelemetry.sdk.resources.Resource;

/** {@link ResourceProvider} for automatically configuring {@link BeanstalkResource}. */
/**
* {@link ResourceProvider} for automatically configuring {@link BeanstalkResource}.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class BeanstalkResourceProvider implements ResourceProvider {
@Override
public Resource createResource(ConfigProperties config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
/**
* A factory for a {@link Resource} which provides information about the current EC2 instance if
* running on AWS EC2.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class Ec2Resource {

private static final Logger logger = Logger.getLogger(Ec2Resource.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider;
import io.opentelemetry.sdk.resources.Resource;

/** {@link ResourceProvider} for automatically configuring {@link Ec2Resource}. */
/**
* {@link ResourceProvider} for automatically configuring {@link Ec2Resource}.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class Ec2ResourceProvider implements ResourceProvider {
@Override
public Resource createResource(ConfigProperties config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
/**
* A factory for a {@link Resource} which provides information about the current ECS container if
* running on AWS ECS.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class EcsResource {
private static final Logger logger = Logger.getLogger(EcsResource.class.getName());
private static final JsonFactory JSON_FACTORY = new JsonFactory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider;
import io.opentelemetry.sdk.resources.Resource;

/** {@link ResourceProvider} for automatically configuring {@link EcsResource}. */
/**
* {@link ResourceProvider} for automatically configuring {@link EcsResource}.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class EcsResourceProvider implements ResourceProvider {
@Override
public Resource createResource(ConfigProperties config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
/**
* A factory for a {@link Resource} which provides information about the current ECS container if
* running on AWS EKS.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class EksResource {
private static final Logger logger = Logger.getLogger(EksResource.class.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider;
import io.opentelemetry.sdk.resources.Resource;

/** {@link ResourceProvider} for automatically configuring {@link EksResource}. */
/**
* {@link ResourceProvider} for automatically configuring {@link EksResource}.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class EksResourceProvider implements ResourceProvider {
@Override
public Resource createResource(ConfigProperties config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@
import java.util.Map;
import java.util.stream.Stream;

/** A factory for a {@link Resource} which provides information about the AWS Lambda function. */
/**
* A factory for a {@link Resource} which provides information about the AWS Lambda function.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class LambdaResource {

private static final Resource INSTANCE = buildResource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider;
import io.opentelemetry.sdk.resources.Resource;

/** {@link ResourceProvider} for automatically configuring {@link LambdaResource}. */
/**
* {@link ResourceProvider} for automatically configuring {@link LambdaResource}.
*
* @deprecated Moved to <a
* href="https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/aws-resources">io.opentelemetry.contrib:opentelemetry-aws-resources</a>.
*/
@Deprecated
public final class LambdaResourceProvider implements ResourceProvider {
@Override
public Resource createResource(ConfigProperties config) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

@SuppressWarnings("deprecation") // Moved to contrib
class BeanstalkResourceTest {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

@SuppressWarnings("deprecation") // Moved to contrib
class Ec2ResourceTest {

// From https://docs.amazonaws.cn/en_us/AWSEC2/latest/UserGuide/instance-identity-documents.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

@SuppressWarnings("deprecation") // Moved to contrib
@ExtendWith(MockitoExtension.class)
class EcsResourceTest {
private static final String ECS_METADATA_KEY_V4 = "ECS_CONTAINER_METADATA_URI_V4";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

package io.opentelemetry.sdk.extension.aws.resource;

import static io.opentelemetry.sdk.extension.aws.resource.EksResource.AUTH_CONFIGMAP_PATH;
import static io.opentelemetry.sdk.extension.aws.resource.EksResource.CW_CONFIGMAP_PATH;
import static io.opentelemetry.sdk.extension.aws.resource.EksResource.K8S_SVC_URL;
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.assertThat;
import static org.assertj.core.api.Assertions.entry;
import static org.mockito.ArgumentMatchers.any;
Expand All @@ -30,6 +27,7 @@
import org.mockito.Mockito;
import org.mockito.junit.jupiter.MockitoExtension;

@SuppressWarnings("deprecation") // Moved to contrib
@ExtendWith(MockitoExtension.class)
public class EksResourceTest {

Expand All @@ -47,9 +45,21 @@ void testEks(@TempDir File tempFolder) throws IOException {
String truststore = "truststore123";
Files.write(truststore.getBytes(Charsets.UTF_8), mockK8sKeystoreFile);

when(httpClient.fetchString(any(), Mockito.eq(K8S_SVC_URL + AUTH_CONFIGMAP_PATH), any(), any()))
when(httpClient.fetchString(
any(),
Mockito.eq(
io.opentelemetry.sdk.extension.aws.resource.EksResource.K8S_SVC_URL
+ io.opentelemetry.sdk.extension.aws.resource.EksResource.AUTH_CONFIGMAP_PATH),
any(),
any()))
.thenReturn("not empty");
when(httpClient.fetchString(any(), Mockito.eq(K8S_SVC_URL + CW_CONFIGMAP_PATH), any(), any()))
when(httpClient.fetchString(
any(),
Mockito.eq(
io.opentelemetry.sdk.extension.aws.resource.EksResource.K8S_SVC_URL
+ io.opentelemetry.sdk.extension.aws.resource.EksResource.CW_CONFIGMAP_PATH),
any(),
any()))
.thenReturn("{\"data\":{\"cluster.name\":\"my-cluster\"}}");
when(mockDockerHelper.getContainerId()).thenReturn("0123456789A");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.util.ServiceLoader;
import org.junit.jupiter.api.Test;

@SuppressWarnings("deprecation") // Moved to contrib
class LambdaResourceTest {
@Test
void shouldNotCreateResourceForNotLambda() {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading