Skip to content

Commit 1ed14e2

Browse files
authored
made various cleanups (#179)
1 parent c4508cf commit 1ed14e2

File tree

9 files changed

+63
-84
lines changed

9 files changed

+63
-84
lines changed

src/docs/getting-started/dotnet-sdk/trace-manual-instr.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Tracing with the AWS Distro for OpenTelemetry .NET SDK'
2+
title: 'Tracing with the AWS Distro for OpenTelemetry .NET SDK and X-Ray'
33
description:
44
OpenTelemetry provides different language SDKs to instrument code for collecting telemetry data in the application.
55
In this tutorial, we will introduce how to use OpenTelemetry .NET SDK for traces instrumentation in the application.

src/docs/getting-started/go-sdk/trace-manual-instr.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Tracing with the AWS Distro for OpenTelemetry Go SDK'
2+
title: 'Tracing with the AWS Distro for OpenTelemetry Go SDK and X-Ray'
33
description:
44
OpenTelemetry provides different language SDKs to instrument code for collecting telemetry data in the application.
55
In this tutorial, we will introduce how to use OpenTelemetry Go SDK for traces instrumentation in the application.

src/docs/getting-started/java-sdk.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
---
2-
title: 'Getting Started with the Java SDK on Traces and Metrics Instrumentation'
2+
title: 'Getting Started with the Java SDK for Traces Instrumentation'
33
description:
44
OpenTelemetry provides different language SDKs to instrument code for collecting telemetry data in the application.
55
path: '/docs/getting-started/java-sdk'
66
---
77

88
import SectionSeparator from "components/MdxSectionSeparator/sectionSeparator.jsx"
99

10-
# Getting Started with the Java SDK on Traces and Metrics Instrumentation
11-
1210
The AWS Distro for OpenTelemetry (ADOT) Java refers to some components developed to complement the upstream
1311
[OpenTelemetry (OTel) Java SDK](https://github.com/open-telemetry/opentelemetry-java) and
1412
[OTel Java Auto-Instrumentation](https://github.com/open-telemetry/opentelemetry-java-instrumentation). Below are links
@@ -23,4 +21,4 @@ backend.
2321
* [Manual Instrumentation for Traces with the Java SDK](/docs/getting-started/java-sdk/trace-manual-instr)
2422

2523
## Sample Code
26-
* [Sample Spring App using OpenTelemetry Java Auto Instrumentation](https://github.com/aws-samples/one-observability-demo/tree/main/PetAdoptions/petsearch-java)
24+
* [Sample Spring App using OpenTelemetry Java Auto-Instrumentation](https://catalog.us-east-1.prod.workshops.aws/v2/workshops/31676d37-bbe9-4992-9cd1-ceae13c5116c/en-US/adot/javawalkthrough)

src/docs/getting-started/java-sdk/trace-auto-instr.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import SectionSeparator from "components/MdxSectionSeparator/sectionSeparator.js
1212

1313
## Introduction
1414

15-
The AWS Distro for OpenTelemetry Java Auto-Instrumentation Agent can be attached to any Java 8+ application to gather
15+
The AWS Distro for OpenTelemetry (ADOT) Java Auto-Instrumentation Agent can be attached to any Java 8+ application to gather
1616
telemetry data from a diverse set of libraries and frameworks. The agent will automatically transform code at startup
1717
to collect tracing data. It is preconfigured for compatibility with X-Ray and AWS services but can also be used with any
1818
other tracing backend. Out of the box, it propagates traces using all of W3C Trace Context, B3, and X-Amzn-Trace-Id.
@@ -83,7 +83,7 @@ artifact, any usage of it will be disabled by the agent.
8383
##### For Gradle:
8484
```java lineNumbers=true
8585
dependencies {
86-
implementation("io.opentelemetry:opentelemetry-api:1.5.0")
86+
implementation("io.opentelemetry:opentelemetry-api:1.6.0")
8787
}
8888
```
8989

@@ -93,7 +93,7 @@ dependencies {
9393
<dependency>
9494
<groupId>io.opentelemetry</groupId>
9595
<artifactId>opentelemetry-api</artifactId>
96-
<version>1.5.0</version>
96+
<version>1.6.0</version>
9797
</dependency>
9898
</dependencies>
9999
```
@@ -103,4 +103,6 @@ for more detail on using the OpenTelemetry API.
103103

104104
<SectionSeparator />
105105

106-
* [Sample Spring App using OpenTelemetry Java Auto Instrumentation](https://github.com/aws-samples/one-observability-demo/tree/main/PetAdoptions/petsearch-java)
106+
## Sample Application
107+
108+
Visit the [Sample Spring App using OpenTelemetry Java Auto-Instrumentation](https://catalog.us-east-1.prod.workshops.aws/v2/workshops/31676d37-bbe9-4992-9cd1-ceae13c5116c/en-US/adot/javawalkthrough).

src/docs/getting-started/java-sdk/trace-manual-instr.mdx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you are using the Auto-Instrumentation Java Agent, refer to the [documentatio
2525

2626
[Java 8 (or later)](https://adoptopenjdk.net/) is required to run an application using OpenTelemetry.
2727

28-
Note: You’ll also need to have the AWS Distro for OpenTelemetry Collector running to export traces to X-Ray.
28+
Note: You’ll also need to have the AWS Distro for OpenTelemetry (ADOT) Collector running to export traces to X-Ray.
2929

3030
<SectionSeparator />
3131

@@ -37,7 +37,7 @@ to align dependency versions for non-contrib components.
3737
##### For Gradle:
3838
```java lineNumbers=true
3939
dependencies {
40-
api(platform("io.opentelemetry:opentelemetry-bom:1.5.0"))
40+
api(platform("io.opentelemetry:opentelemetry-bom:1.6.0"))
4141

4242
implementation("io.opentelemetry:opentelemetry-api")
4343
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
@@ -46,7 +46,7 @@ dependencies {
4646

4747
implementation("io.opentelemetry:opentelemetry-extension-aws")
4848
implementation("io.opentelemetry:opentelemetry-sdk-extension-aws")
49-
implementation("io.opentelemetry.contrib:opentelemetry-aws-xray:1.5.0")
49+
implementation("io.opentelemetry.contrib:opentelemetry-aws-xray:1.6.0")
5050
}
5151
```
5252

@@ -57,7 +57,7 @@ dependencies {
5757
<dependency>
5858
<groupId>io.opentelemetry</groupId>
5959
<artifactId>opentelemetry-bom</artifactId>
60-
<version>1.5.0</version>
60+
<version>1.6.0</version>
6161
<type>pom</type>
6262
<scope>import</scope>
6363
<dependency>
@@ -87,7 +87,7 @@ dependencies {
8787
<dependency>
8888
<groupId>io.opentelemetry.contrib</groupId>
8989
<artifactId>opentelemetry-aws-xray</artifactId>
90-
<version>1.5.0</version>
90+
<version>1.6.0</version>
9191
</dependency>
9292
</dependencies>
9393
```
@@ -102,10 +102,14 @@ Initialize the OpenTelemetry SDK with AWS components for exporting to X-Ray as f
102102

103103
```java
104104
OpenTelemetrySdk.builder()
105+
106+
// This will enable your downstream requests to include the X-Ray trace header
105107
.setPropagators(
106108
ContextPropagators.create(
107109
TextMapPropagator.composite(
108110
W3CTraceContextPropagator.getInstance(), AwsXrayPropagator.getInstance())))
111+
112+
// This provides basic configuration of a TracerProvider which generates X-Ray compliant IDs
109113
.setTracerProvider(
110114
SdkTracerProvider.builder()
111115
.addSpanProcessor(
@@ -147,6 +151,7 @@ OpenTelemetrySdk.builder()
147151
...
148152
.setResource(
149153
Resource.getDefault()
154+
.merge(BeanstalkResource.get())
150155
.merge(Ec2Resource.get())
151156
.merge(EcsResource.get()
152157
.merge(EksResource.get())))
@@ -176,7 +181,7 @@ library instrumentation. When using this, do not include `opentelemetry-bom`.
176181
##### For Gradle:
177182
```java lineNumbers=true
178183
dependencies {
179-
api(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.5.0-alpha"))
184+
api(platform("io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.6.0-alpha"))
180185

181186
implementation("io.opentelemetry:opentelemetry-api")
182187
implementation("io.opentelemetry:opentelemetry-exporter-otlp")
@@ -195,7 +200,7 @@ dependencies {
195200
<dependency>
196201
<groupId>io.opentelemetry.instrumentation</groupId>
197202
<artifactId>opentelemetry-instrumentation-bom-alpha</artifactId>
198-
<version>1.5.0</version>
203+
<version>1.6.0</version>
199204
<type>pom</type>
200205
<scope>import</scope>
201206
<dependency>
@@ -226,7 +231,6 @@ dependencies {
226231

227232
The `opentelemetry-instrumentation-aws-sdk-2.2` artifact provides instrumentation for the AWS SDK v2.
228233

229-
230234
##### For Gradle:
231235
```java lineNumbers=true
232236
dependencies {

src/docs/getting-started/python-sdk/trace-auto-instr.mdx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'ADOT Python - Auto-Instrumentation Documentation'
2+
title: 'Tracing with the AWS Distro for OpenTelemetry Python Auto-Instrumentation and X-Ray'
33
description:
44
OpenTelemetry provides different language SDKs to instrument code for collecting telemetry data in the application.
55
In this tutorial, we will introduce how to use OpenTelemetry Python SDK for traces and metrics instrumentation in the application...
@@ -9,8 +9,6 @@ path: '/docs/getting-started/python-sdk/trace-auto-instr'
99
import SectionSeparator from "components/MdxSectionSeparator/sectionSeparator.jsx"
1010
import SubSectionSeparator from "components/MdxSubSectionSeparator/subsectionSeparator.jsx"
1111

12-
# Tracing with the AWS Distro for OpenTelemetry Python Auto-Instrumentation
13-
1412
## Introduction
1513

1614
OpenTelemetry Python supports automatic instrumentation. It automatically produces spans with telemetry data describing the values used by the python frameworks in your application without adding a single line of code. This telemetry data can then be exported to a backend like AWS X-Ray using the ADOT Python `opentelemetry-sdk-extension-aws` package.
@@ -34,7 +32,7 @@ The easiest way to download the packages needed for auto-instrumentation is usin
3432
```bash
3533
# Install required packages for instrumentation and to support tracing with AWS X-Ray
3634
$ pip install opentelemetry-distro[otlp]>=0.24b0 \
37-
opentelemetry-sdk-extension-aws~=1.0.0
35+
opentelemetry-sdk-extension-aws~=1.0
3836
```
3937

4038
Installing the `opentelemetry-sdk-extension-aws` package automatically installs the `opentelemetry-api`, `opentelemetry-sdk`, and `opentelemetry-instrumentation` packages as dependencies.
@@ -50,8 +48,6 @@ $ opentelemetry-bootstrap --action=install
5048

5149
For example, if you have `boto3` installed, this command will automatically install the `opentelemetry-instrumentation-botocore` package which auto-instrumentation can subsequently configure automatically. Check out the OpenTelemetry registry for a [full list of instrumentation packages provided by OpenTelemetry Python](https://opentelemetry.io/registry/?s=&component=instrumentation&language=python).
5250

53-
<SubSectionSeparator />
54-
5551
## Running an Application with Auto-Instrumentation
5652

5753
Auto-instrumentation uses the `opentelemetry-instrument` executable functions as a wrapper to automatically initialize the `Instrumentors` installed by the `opentelemetry-bootstrap` command and start the provided application.
@@ -110,4 +106,4 @@ Because there can only be one global `TracerProvider`, manual instrumentation sh
110106

111107
## Sample Application
112108

113-
See a [sample Flask App using OpenTelemetry Python SDK Automatic Instrumentation](https://github.com/aws-observability/aws-otel-python/tree/main/integration-test-apps/auto-instrumentation/flask)
109+
See a [sample Flask App using OpenTelemetry Python SDK Automatic Instrumentation](https://github.com/aws-observability/aws-otel-python/tree/main/integration-test-apps/auto-instrumentation/flask).

src/docs/getting-started/python-sdk/trace-manual-instr.mdx

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'ADOT Python - Manual Instrumentation Documentation'
2+
title: 'Tracing with the AWS Distro for OpenTelemetry Python SDK and X-Ray'
33
description:
44
OpenTelemetry provides different language SDKs to instrument code for collecting telemetry data in the application.
55
In this tutorial, we will introduce how to use OpenTelemetry Python SDK for traces and metrics instrumentation in the application...
@@ -9,8 +9,6 @@ path: '/docs/getting-started/python-sdk/trace-manual-instr'
99
import SectionSeparator from "components/MdxSectionSeparator/sectionSeparator.jsx"
1010
import SubSectionSeparator from "components/MdxSubSectionSeparator/subsectionSeparator.jsx"
1111

12-
# Tracing with the AWS Distro for OpenTelemetry Python SDK
13-
1412
## Introduction
1513

1614
With OpenTelemetry Python manual instrumentation, you configure the OpenTelemetry SDK within your application's code. It automatically produces spans with telemetry data describing the values used by the Python frameworks in your application with only a few lines of code. This telemetry data can then be exported to a backend like AWS X-Ray using the ADOT Python `opentelemetry-sdk-extension-aws` package.
@@ -110,8 +108,6 @@ Alternatively, set the `OTEL_PROPAGATORS` environment variable to achieve the sa
110108
OTEL_PROPAGATORS=xray
111109
```
112110

113-
<SectionSeparator />
114-
115111
### Using the AWS resource Detectors
116112

117113
When you install `opentelemetry-sdk-extension-aws`, you automatically get AWS Resource Detectors in the same package. Use the provided `Resource Detectors` to automatically populate attributes under the `resource` namespace of each generated span.
@@ -140,9 +136,9 @@ trace.set_tracer_provider(
140136
)
141137
```
142138

143-
To see what attributes are captured and how to add other resource detectors, refer to each detectors' docstring in the [OpenTelemetry SDK Extension for AWS](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/sdk-extension/opentelemetry-sdk-extension-aws) to determine any requirements for that detector.
144-
145-
<SubSectionSeparator />
139+
To see what attributes are captured and how to add other resource detectors, refer to each detectors' docstring in the
140+
[OpenTelemetry SDK Extension for AWS](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/sdk-extension/opentelemetry-sdk-extension-aws)
141+
to determine any requirements for that detector.
146142

147143
### Debug Logging
148144

@@ -166,7 +162,7 @@ logger = logging.getLogger(__file__)
166162
logger.debug("My debug level log.")
167163
```
168164

169-
<SubSectionSeparator />
165+
<SectionSeparator />
170166

171167
## Instrumenting an Application
172168

@@ -189,8 +185,6 @@ RequestsInstrumentor().instrument()
189185
FlaskInstrumentor().instrument_app(app)
190186
```
191187

192-
<SubSectionSeparator />
193-
194188
### Instrumenting the AWS SDK
195189

196190
To install the instrumentation library for the AWS SDK and its dependencies, run the `pip install` command from below which applies to your application. **NOTE:** Since these instrumentations are not yet stable, we recommend installing it at a pinned version.
@@ -229,7 +223,7 @@ BotocoreInstrumentor().instrument()
229223

230224
For more information refer to the upstream documentation for [OpenTelemetry Python boto Instrumentation](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-boto) or [OpenTelemetry Python botocore Instrumentation](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-botocore).
231225

232-
<SubSectionSeparator />
226+
<SectionSeparator />
233227

234228
## Custom Instrumentation
235229

@@ -261,8 +255,6 @@ with tracer.start_as_current_span("Root Span", kind=trace.SpanKind.SERVER):
261255
return '<h1>Good job! Traces recorded!</h1>'
262256
```
263257

264-
<SubSectionSeparator />
265-
266258
### Adding custom attributes
267259

268260
You can also add custom key-value pairs as attributes onto your spans. Attributes are converted to metadata by default. If you [configure your collector](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/7bf2266a025425993a233f66c77a0810ab11a78b/exporter/awsxrayexporter#exporter-configuration), you can convert some or all of the attributes to annotations. To read more about X-Ray annotations and metadata see the [AWS X-Ray Developer Guide](https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-annotations).
@@ -298,8 +290,8 @@ with tracer.start_as_current_span("Root Span") as span:
298290
current_span.set_attribute("my_attribute", "foo")
299291
```
300292

301-
<SubSectionSeparator />
293+
<SectionSeparator />
302294

303295
## Sample Application
304296

305-
See a [sample Flask App using OpenTelemetry Python SDK Manual Instrumentation](https://github.com/aws-observability/aws-otel-python/tree/main/integration-test-apps/manual-instrumentation/flask)
297+
See a [sample Flask App using OpenTelemetry Python SDK Manual Instrumentation](https://github.com/aws-observability/aws-otel-python/tree/main/integration-test-apps/manual-instrumentation/flask).

0 commit comments

Comments
 (0)