Skip to content

Commit b31163c

Browse files
clean up code comments
1 parent bd01735 commit b31163c

File tree

3 files changed

+37
-65
lines changed

3 files changed

+37
-65
lines changed

docs/configure.asciidoc

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ include::release-status.asciidoc[]
1919
The {distro_name} ("the distro") offers a lot of flexibility...
2020

2121
////
22-
How do users set configuration options?
22+
How users set configuration options
2323
////
2424
[discrete]
2525
[[configure-methods]]
@@ -39,30 +39,30 @@ You can set configuration options using a few different methods:
3939
[[configure-environment-variables]]
4040
==== Environment variables
4141

42-
// What and why
42+
// What and why
4343
The distro can be configured using environment variables.
4444
This is a cross-platform way to configure the distro and is especially useful in containerized environments.
4545

46-
// How
46+
// How
4747
Environment variables are read at startup and can be used to configure the Elastic distribution.
4848
For details of the various options available and their corresponding environment variable names,
4949
see <<configure-configuration-options>>.
5050

51-
// Example
51+
// TO DO: Example
5252

53-
// Order of operations
53+
// Order of operations
5454
Environment variables always take precedence over configuration provided by the `IConfiguration`
5555
system.
5656

5757
[discrete]
5858
[[configure-iconfiguration-integration]]
5959
==== IConfiguration integration
6060

61-
// What and why
61+
// What and why
6262
In applications that use the "host" pattern, such as ASP.NET Core and worker service, the distro
6363
can be configured using the `IConfiguration` integration.
6464

65-
// How
65+
// How
6666
This is done by passing an `IConfiguration` instance to the `AddElasticOpenTelemetry` extension
6767
method on the `IServiceCollection`.
6868

@@ -80,7 +80,7 @@ By default, at this stage, the configuration will be populated from the default
8080
including the `appsettings.json` file(s) and command-line arguments. You may use these sources to define
8181
the configuration for the Elastic Distribution for OpenTelemetry .NET.
8282

83-
// Example
83+
// Example
8484
For example, you can define the configuration for the Elastic Distribution for OpenTelemetry .NET in the `appsettings.json` file:
8585

8686
[source,json]
@@ -95,7 +95,7 @@ For example, you can define the configuration for the Elastic Distribution for O
9595
----
9696
<1> This example sets the file log directory to `C:\Logs` which enables diagnostic file logging.
9797

98-
// Order of operations
98+
// Order of operations
9999
Configuration from the "Elastic:OpenTelemetry" section of the `IConfiguration` instance will be
100100
bound to the `ElasticOpenTelemetryOptions` instance used to configure the Elastic distribution.
101101

@@ -106,15 +106,15 @@ https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration[Configu
106106
[[configure-manual-configuration]]
107107
==== Manual configuration
108108

109-
// What and why
109+
// What and why
110110
In all other scenarios, configuration can be achieved manually in code.
111111

112-
// How
112+
// How
113113
This is done by creating an instance of `ElasticOpenTelemetryBuilderOptions` and passing it to the
114114
`ElasticOpenTelemetryBuilder` constructor or an overload of the `AddElasticOpenTelemetry` extension
115115
method on the `IServiceCollection`.
116116

117-
// Example
117+
// Example
118118
For example, in traditional console applications, you can configure the
119119
Elastic Distribution for OpenTelemetry .NET like this:
120120

@@ -147,20 +147,16 @@ setting the corresponding property.
147147
<4> Pass the `ElasticOpenTelemetryBuilderOptions` instance to the `ElasticOpenTelemetryBuilder` constructor
148148
to configure the Elastic Distribution for OpenTelemetry .NET.
149149

150-
// Order of operations
150+
// TO DO: Order of operations
151151

152152
////
153-
What are the available configuration options?
153+
✅ List all available configuration options
154154
////
155155
[discrete]
156156
[[configure-configuration-options]]
157157
=== Configuration options
158158

159-
////
160-
Is this true? Is the distro a wrapper around the OpenTelemetry .NET agent
161-
which is a wrapper around the general OpenTelemetry SDK? 🌀
162-
////
163-
Because the {distro_name} ("the distro") is a wrapper around the https://github.com/open-telemetry/opentelemetry-{language_lc}-instrumentation[OpenTelemetry {language} agent], it supports both:
159+
Because the {distro_name} ("the distro") is an extension of the https://github.com/open-telemetry/opentelemetry-{language_lc}-instrumentation[OpenTelemetry {language} agent], it supports both:
164160

165161
* General OpenTelemetry SDK configuration options
166162
* Elastic-specific configuration options that are only available when using the distro
@@ -169,10 +165,6 @@ Because the {distro_name} ("the distro") is a wrapper around the https://github.
169165
[[configure-otel-sdk-options]]
170166
==== OpenTelemetry SDK configuration options
171167

172-
////
173-
Is this true? Are there any options that aren't supported?
174-
Any options that shouldn't be used?
175-
////
176168
The distro supports all configuration options listed in the https://opentelemetry.io/docs/languages/sdk-configuration/general/[OpenTelemetry General SDK Configuration documentation].
177169

178170
[discrete]
@@ -275,6 +267,7 @@ Elastic defaults only for tracing and metrics, set this value to `Tracing,Metric
275267
|===
276268

277269
////
270+
TO DO:
278271
Are there multiple authentication methods when sending data to Elastic?
279272
If no, delete this section.
280273
////
@@ -288,13 +281,13 @@ When sending data to Elastic, there are two ways you can authenticate: using a s
288281
[[configure-secret-token]]
289282
==== Use a secret token
290283

291-
// What is this?
284+
// TO DO:What is this?
292285
// ??
293286

294-
// Why would you choose this method?
287+
// TO DO:Why would you choose this method?
295288
// ??
296289

297-
// How do you authenticate using this method?
290+
// TO DO:How do you authenticate using this method?
298291
// ??
299292

300293
[discrete]
@@ -305,7 +298,7 @@ When sending data to Elastic, there are two ways you can authenticate: using a s
305298
It is also possible to authenticate to an Elastic Observability endpoint using
306299
an _APM agent key_. These are revocable API keys.
307300

308-
// Why would you choose this method?
301+
// TO DO:Why would you choose this method?
309302
// ??
310303

311304
// How do you authenticate using this method?
@@ -318,7 +311,7 @@ When using an APM Agent key, the `OTEL_EXPORTER_OTLP_HEADERS` is set using a
318311
different auth schema (`ApiKey` rather than `Bearer`). For example:
319312

320313
////
321-
Code example
314+
TO DO:Code example
322315
////
323316

324317
:!language:

docs/get-started.asciidoc

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ include::release-status.asciidoc[]
2020
This guide shows you how to use the {distro_name} ("the distro") to instrument your {language} application and send OpenTelemetry data to an Elastic Observability deployment.
2121

2222
////
23-
Is this true?
23+
TO DO: Is this true?
2424
////
2525
[NOTE]
2626
====
2727
As an OpenTelemetry SDK, the distro supports sending data to any OpenTelemetry protocol (OTLP) endpoint (for example, an https://opentelemetry.io/docs/collector/[OpenTelemetry Collector]).
2828
====
2929

3030
////
31-
What does a user need to know and/or do before they install the distro?
31+
What the user needs to know and/or do before they install the distro
3232
////
3333
[discrete]
3434
[[get-started-prerequisites]]
@@ -55,18 +55,14 @@ This section shows how to create an https://www.elastic.co/observability[Elastic
5555
====
5656

5757
////
58-
Other prereqs?
59-
////
60-
61-
////
62-
How does a user install the distro?
58+
✅ How to install the distro
6359
////
6460
[discrete]
6561
[[get-started-install]]
6662
=== Install
6763

6864
////
69-
Step-by-step instructions
65+
Step-by-step instructions
7066
////
7167
To get started with the Elastic OpenTelemetry Distribution for .NET, add the `Elastic.OpenTelemetry` NuGet package reference to your project file:
7268

@@ -79,7 +75,7 @@ After adding the package reference, you can start using the distro
7975
in your application.
8076

8177
////
82-
Any additional info related to installation
78+
Any additional info related to installation
8379
////
8480
[NOTE]
8581
.The Elastic distro and the OpenTelemetry SDK
@@ -100,7 +96,7 @@ switch to the opinionated configuration provided by the Elastic distro.
10096
====
10197

10298
////
103-
What does the user need to do in their application to prepare to send data Elastic?
99+
✅ Start-to-finish operation
104100
////
105101
[discrete]
106102
[[get-started-send-data]]
@@ -123,9 +119,7 @@ and the default choice for applications created using the latest templates.
123119
====
124120

125121
////
126-
Are there any dependencies that need to be installed in addition to the distro?
127-
If yes, does it matter in what order dependencies are defined?
128-
If no, delete this section.
122+
✅ Any dependencies that need to be installed in addition to the distro
129123
////
130124
[discrete]
131125
[[get-started-add-dependencies]]
@@ -210,8 +204,7 @@ exporter requires that endpoint(s) are configured. A common mechanism for config
210204
endpoints is via environment variables.
211205

212206
////
213-
What does the _minimal_ configuration / setup look like?
214-
Are there any configuration options that are _required_?
207+
✅ Provide _minimal_ configuration/setup
215208
////
216209
[discrete]
217210
[[get-started-configure]]
@@ -232,7 +225,7 @@ for your observability data.
232225
====
233226

234227
////
235-
Step-by-step instructions
228+
Step-by-step instructions
236229
////
237230
When sending data to Elastic, you can find the values of these variables in Kibana's APM setup guide:
238231

@@ -251,21 +244,7 @@ and exported to the OTLP endpoint.
251244
For more information on all the available configuration options, refer to <<configure>>.
252245

253246
////
254-
Does the user need to do something after configuring the distro
255-
for data to start being sent Elastic?
256-
If no, delete this section.
257-
////
258-
[discrete]
259-
[[get-started-initialization]]
260-
==== Initialize the distro
261-
262-
////
263-
Step-by-step instructions
264-
////
265-
266-
////
267-
What should they expect to see after running this?
268-
How do they know it worked as expected?
247+
✅ What success looks like
269248
////
270249
[discrete]
271250
[[get-started-view-traces]]
@@ -274,13 +253,13 @@ How do they know it worked as expected?
274253
To view the traces, you can use the Elastic APM UI:
275254

276255
////
277-
Step-by-step instructions
256+
TO DO: Step-by-step instructions
278257
////
279258

280259
image:images/trace-sample-minimal-api.png[Minimal API request trace sample in the Elastic APM UI]
281260

282261
////
283-
What should they do next?
262+
TO DO: What should they do next?
284263
////
285264
[discrete]
286265
[[get-started-next-steps]]

docs/intro.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ Assumptions we're comfortable making about the reader:
2121
include::release-status.asciidoc[]
2222

2323
////
24-
Intro
24+
Intro
2525
////
2626
The {distro_name} ("the distro") is a {language} package that provides:
2727

2828
* An easy way to instrument your application with OpenTelemetry.
2929
* Configuration defaults for best usage.
3030

3131
////
32-
What is it?
33-
Why use it?
32+
What is it?
33+
Why use it?
3434
////
3535
A _distribution_ is a wrapper around an upstream OpenTelemetry repository with some customizations. The {distro_name} is a wrapper around the https://opentelemetry.io/docs/languages/{language_lc}[OpenTelemetry SDK for {language}] and includes the following customizations:
3636

@@ -41,7 +41,7 @@ A _distribution_ is a wrapper around an upstream OpenTelemetry repository with s
4141
NOTE: For more details about OpenTelemetry distributions in general, visit the https://opentelemetry.io/docs/concepts/distributions[OpenTelemetry documentation].
4242

4343
////
44-
How to use it?
44+
How to use it?
4545
////
4646
Use the distro to start the OpenTelemetry SDK with your {language} application to automatically capture tracing data, performance metrics, and logs. Traces, metrics, and logs are sent to any OTLP collector you choose.
4747

0 commit comments

Comments
 (0)