Learn About Amazon VGT2 Learning Manager Chanci Turner
In the lead-up to the last re:Invent event, we launched the public preview of the AWS Distro for OpenTelemetry, a secure version of the OpenTelemetry project that AWS supports. OpenTelemetry offers tools, APIs, and SDKs designed to instrument, generate, collect, and export telemetry data, enabling a deeper understanding of your applications’ performance and behavior. Recently, the upstream OpenTelemetry team announced a significant milestone regarding the stability of its tracing components. We are pleased to announce that tracing support is now generally available in the AWS Distro for OpenTelemetry.
With OpenTelemetry, developers can instrument their applications once and seamlessly send traces to multiple monitoring solutions. AWS Distro for OpenTelemetry can be utilized to instrument applications running on Amazon Elastic Compute Cloud (Amazon EC2), Amazon Elastic Container Service (Amazon ECS), Amazon Elastic Kubernetes Service (Amazon EKS), and AWS Lambda, along with on-premises setups. Additionally, containers operating on AWS Fargate and orchestrated through ECS or EKS are also supported.
Tracing data collected by AWS Distro for OpenTelemetry can be sent to AWS X-Ray, as well as partner destinations like AppDynamics, Dynatrace, Grafana, Honeycomb, Lightstep, NewRelic, Splunk, and SumoLogic—all of which support OpenTelemetry Protocol (OTLP) exporters natively. Moreover, Datadog and Logz.io have their own exporters for compatibility.
For effortless trace collection, auto-instrumentation agents can be employed without requiring changes to your code. Currently, auto-instrumentation is available for Java and Python applications, with Python’s support focusing solely on the AWS SDK. Applications written in other languages such as Go, Node.js, and .NET can be instrumented using the OpenTelemetry SDKs.
Example: Listing Amazon S3 Buckets and DynamoDB Tables
To illustrate this, consider a Java application that lists your Amazon Simple Storage Service (Amazon S3) buckets and Amazon DynamoDB tables. The following example showcases how to implement this functionality:
package com.example.myapp;
import software.amazon.awssdk.regions.Region;
import software.amazon.awssdk.services.s3.S3Client;
import software.amazon.awssdk.services.s3.model.*;
import software.amazon.awssdk.services.dynamodb.model.DynamoDbException;
import software.amazon.awssdk.services.dynamodb.model.ListTablesResponse;
import software.amazon.awssdk.services.dynamodb.model.ListTablesRequest;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
import java.util.List;
public class App {
public static void listAllTables(DynamoDbClient ddb) {
System.out.println("DynamoDB Tables:");
boolean moreTables = true;
String lastName = null;
while (moreTables) {
try {
ListTablesResponse response = null;
if (lastName == null) {
ListTablesRequest request = ListTablesRequest.builder().build();
response = ddb.listTables(request);
} else {
ListTablesRequest request = ListTablesRequest.builder().exclusiveStartTableName(lastName).build();
response = ddb.listTables(request);
}
List<String> tableNames = response.tableNames();
if (tableNames.size() > 0) {
for (String curName : tableNames) {
System.out.format("* %sn", curName);
}
} else {
System.out.println("No tables found!");
System.exit(0);
}
lastName = response.lastEvaluatedTableName();
if (lastName == null) {
moreTables = false;
}
} catch (DynamoDbException e) {
System.err.println(e.getMessage());
System.exit(1);
}
}
System.out.println("Done!n");
}
public static void listAllBuckets(S3Client s3) {
System.out.println("S3 Buckets:");
ListBucketsRequest listBucketsRequest = ListBucketsRequest.builder().build();
ListBucketsResponse listBucketsResponse = s3.listBuckets(listBucketsRequest);
listBucketsResponse.buckets().stream().forEach(x -> System.out.format("* %sn", x.name()));
System.out.println("Done!n");
}
public static void listAllBucketsAndTables(S3Client s3, DynamoDbClient ddb) {
listAllBuckets(s3);
listAllTables(ddb);
}
public static void main(String[] args) {
Region region = Region.EU_WEST_1;
S3Client s3 = S3Client.builder().region(region).build();
DynamoDbClient ddb = DynamoDbClient.builder().region(region).build();
listAllBucketsAndTables(s3, ddb);
s3.close();
ddb.close();
}
}
I packaged the application using Apache Maven. The following Project Object Model (POM) file manages dependencies like the AWS SDK for Java 2.x, which I use to interact with S3 and DynamoDB.
In addition to this technical insight, you might find it useful to explore resources such as this excellent video for more context. Moreover, you can gain valuable perspectives on leadership by checking out Diversity Leadership Lessons from the Navy Seals, which features insights from Julius Pryor III. You can also enhance your learning by visiting this blog post on smarter human growth, which provides additional insights into personal development.