Documentation - allow long lines for tables and code blocks (#3049)

This commit is contained in:
Piotr Kiełkowicz 2022-03-15 19:36:19 +01:00 committed by GitHub
parent a709cfd2a9
commit dff9adeaf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 7 additions and 22 deletions

7
.markdownlint.yaml Normal file
View File

@ -0,0 +1,7 @@
# Default state for all rules
default: true
# allow long lines for tables and code blocks
MD013:
code_blocks: false
tables: false

View File

@ -76,14 +76,12 @@ helper methods.
in each framework that you target. in each framework that you target.
* Add the following lines to your csproj: * Add the following lines to your csproj:
<!-- markdownlint-disable MD013 -->
```xml ```xml
<ItemGroup> <ItemGroup>
<AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Shipped.txt" /> <AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Shipped.txt" />
<AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Unshipped.txt" /> <AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Unshipped.txt" />
</ItemGroup> </ItemGroup>
``` ```
<!-- markdownlint-enable MD013 -->
* Use * Use
[IntelliSense](https://docs.microsoft.com/visualstudio/ide/using-intellisense) [IntelliSense](https://docs.microsoft.com/visualstudio/ide/using-intellisense)

View File

@ -241,7 +241,6 @@ are then aggregated using the custom boundaries provided instead of the the
default boundaries. This requires the use of default boundaries. This requires the use of
`ExplicitBucketHistogramConfiguration`. `ExplicitBucketHistogramConfiguration`.
<!-- markdownlint-disable MD013 -->
```csharp ```csharp
// Change Histogram boundaries to count measurements under the following buckets: // Change Histogram boundaries to count measurements under the following buckets:
// (-inf, 10] // (-inf, 10]
@ -258,7 +257,6 @@ default boundaries. This requires the use of
instrumentName: "MyHistogram", instrumentName: "MyHistogram",
new ExplicitBucketHistogramConfiguration { Boundaries = new double[] { } }) new ExplicitBucketHistogramConfiguration { Boundaries = new double[] { } })
``` ```
<!-- markdownlint-enable MD013 -->
```csharp ```csharp
// Advanced selection criteria and config via Func<Instrument, MetricStreamConfiguration> // Advanced selection criteria and config via Func<Instrument, MetricStreamConfiguration>
@ -343,7 +341,6 @@ There are two total `MetricStream`s created one for each of these instruments.
SDK will limit the maximum number of distinct key/value combinations for each of SDK will limit the maximum number of distinct key/value combinations for each of
these `MetricStream`s to `3`. these `MetricStream`s to `3`.
<!-- markdownlint-disable MD013 -->
```csharp ```csharp
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.Metrics; using System.Diagnostics.Metrics;
@ -397,7 +394,6 @@ AnotherFruitCounter.Add(2, new("name", "banana"), new("color", "green")); // Not
AnotherFruitCounter.Add(5, new("name", "banana"), new("color", "yellow")); // Exported AnotherFruitCounter.Add(5, new("name", "banana"), new("color", "yellow")); // Exported
AnotherFruitCounter.Add(4, new("name", "mango"), new("color", "yellow")); // Not exported AnotherFruitCounter.Add(4, new("name", "mango"), new("color", "yellow")); // Not exported
``` ```
<!-- markdownlint-enable MD013 -->
**NOTE:** The above limit is *per* metric stream, and applies to all the metric **NOTE:** The above limit is *per* metric stream, and applies to all the metric
streams. There is no ability to apply different limits for each instrument at streams. There is no ability to apply different limits for each instrument at

View File

@ -31,7 +31,6 @@ Run the application again (using `dotnet run`) and you should see the metric
output from the console (metrics will be seen once the program ends), output from the console (metrics will be seen once the program ends),
similar to shown below: similar to shown below:
<!-- markdownlint-disable MD013 -->
```text ```text
Export MyFruitCounter, Meter: MyCompany.MyProduct.MyLibrary/1.0 Export MyFruitCounter, Meter: MyCompany.MyProduct.MyLibrary/1.0
(2021-09-23T22:00:08.4399776Z, 2021-09-23T22:00:08.4510115Z] color:red name:apple LongSum (2021-09-23T22:00:08.4399776Z, 2021-09-23T22:00:08.4510115Z] color:red name:apple LongSum
@ -41,7 +40,6 @@ Value: 7
(2021-09-23T22:00:08.4399776Z, 2021-09-23T22:00:08.4510115Z] color:green name:apple LongSum (2021-09-23T22:00:08.4399776Z, 2021-09-23T22:00:08.4510115Z] color:green name:apple LongSum
Value: 2 Value: 2
``` ```
<!-- markdownlint-enable MD013 -->
Congratulations! You are now collecting metrics using OpenTelemetry. Congratulations! You are now collecting metrics using OpenTelemetry.

View File

@ -145,7 +145,6 @@ one possible way of doing this:
**WARNING:** Use `AppDomain.UnhandledException` with caution. A throw in the **WARNING:** Use `AppDomain.UnhandledException` with caution. A throw in the
handler puts the process into an unrecoverable state. handler puts the process into an unrecoverable state.
<!-- markdownlint-disable MD013 -->
```csharp ```csharp
using System; using System;
using System.Diagnostics; using System.Diagnostics;
@ -191,4 +190,3 @@ public class Program
} }
} }
``` ```
<!-- markdownlint-enable MD013 -->

View File

@ -460,13 +460,11 @@ for versions lower than `.NET Framework 4.6.1`.
1. Install the `System.Diagnostics.DiagnosticSource` package version 1. Install the `System.Diagnostics.DiagnosticSource` package version
`6.0.0` or above to your application or library. `6.0.0` or above to your application or library.
<!-- markdownlint-disable MD013 -->
```xml ```xml
<ItemGroup> <ItemGroup>
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" /> <PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" />
</ItemGroup> </ItemGroup>
``` ```
<!-- markdownlint-enable MD013 -->
2. Create a `Meter`, providing the name and version of the library/application 2. Create a `Meter`, providing the name and version of the library/application
doing the instrumentation. The `Meter` instance is typically created once and doing the instrumentation. The `Meter` instance is typically created once and

View File

@ -78,14 +78,12 @@ The following environment variables can be used to override the default
values of the `JaegerExporterOptions` values of the `JaegerExporterOptions`
(following the [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#jaeger-exporter)). (following the [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#jaeger-exporter)).
<!-- markdownlint-disable MD013 -->
| Environment variable | `JaegerExporterOptions` property | | Environment variable | `JaegerExporterOptions` property |
|-----------------------------------|-----------------------------------------------------------| |-----------------------------------|-----------------------------------------------------------|
| `OTEL_EXPORTER_JAEGER_AGENT_HOST` | `AgentHost` | | `OTEL_EXPORTER_JAEGER_AGENT_HOST` | `AgentHost` |
| `OTEL_EXPORTER_JAEGER_AGENT_PORT` | `AgentPort` | | `OTEL_EXPORTER_JAEGER_AGENT_PORT` | `AgentPort` |
| `OTEL_EXPORTER_JAEGER_ENDPOINT` | `Endpoint` | | `OTEL_EXPORTER_JAEGER_ENDPOINT` | `Endpoint` |
| `OTEL_EXPORTER_JAEGER_PROTOCOL` | `Protocol` (`udp/thrift.compact` or `http/thrift.binary`) | | `OTEL_EXPORTER_JAEGER_PROTOCOL` | `Protocol` (`udp/thrift.compact` or `http/thrift.binary`) |
<!-- markdownlint-enable MD013 -->
`FormatException` is thrown in case of an invalid value for any of the `FormatException` is thrown in case of an invalid value for any of the
supported environment variables. supported environment variables.

View File

@ -206,14 +206,12 @@ purposes, the SDK provides the following built-in processors:
The following environment variables can be used to override the default The following environment variables can be used to override the default
values of the `BatchExportActivityProcessorOptions`. values of the `BatchExportActivityProcessorOptions`.
<!-- markdownlint-disable MD013 -->
| Environment variable | `BatchExportActivityProcessorOptions` property | | Environment variable | `BatchExportActivityProcessorOptions` property |
| -------------------------------- | ---------------------------------------------- | | -------------------------------- | ---------------------------------------------- |
| `OTEL_BSP_SCHEDULE_DELAY` | `ScheduledDelayMilliseconds` | | `OTEL_BSP_SCHEDULE_DELAY` | `ScheduledDelayMilliseconds` |
| `OTEL_BSP_EXPORT_TIMEOUT` | `ExporterTimeoutMilliseconds` | | `OTEL_BSP_EXPORT_TIMEOUT` | `ExporterTimeoutMilliseconds` |
| `OTEL_BSP_MAX_QUEUE_SIZE` | `MaxQueueSize` | | `OTEL_BSP_MAX_QUEUE_SIZE` | `MaxQueueSize` |
| `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` | `MaxExportBatchSizeEnvVarKey` | | `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` | `MaxExportBatchSizeEnvVarKey` |
<!-- markdownlint-enable MD013 -->
`FormatException` is thrown in case of an invalid value for any of the `FormatException` is thrown in case of an invalid value for any of the
supported environment variables. supported environment variables.
@ -265,12 +263,10 @@ using var tracerProvider = Sdk.CreateTracerProviderBuilder()
It is also possible to configure the `Resource` by using following It is also possible to configure the `Resource` by using following
environmental variables: environmental variables:
<!-- markdownlint-disable MD013 -->
| Environment variable | Description | | Environment variable | Description |
| -------------------------- | -------------------------------------------------- | | -------------------------- | -------------------------------------------------- |
| `OTEL_RESOURCE_ATTRIBUTES` | Key-value pairs to be used as resource attributes. See the [Resource SDK specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.5.0/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable) for more details. | | `OTEL_RESOURCE_ATTRIBUTES` | Key-value pairs to be used as resource attributes. See the [Resource SDK specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.5.0/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable) for more details. |
| `OTEL_SERVICE_NAME` | Sets the value of the `service.name` resource attribute. If `service.name` is also provided in `OTEL_RESOURCE_ATTRIBUTES`, then `OTEL_SERVICE_NAME` takes precedence. | | `OTEL_SERVICE_NAME` | Sets the value of the `service.name` resource attribute. If `service.name` is also provided in `OTEL_RESOURCE_ATTRIBUTES`, then `OTEL_SERVICE_NAME` takes precedence. |
<!-- markdownlint-enable MD013 -->
### Sampler ### Sampler

View File

@ -5,8 +5,6 @@ Use the following example to run Benchmarks from command line:
Navigate to `./test/Benchmarks` directory and run the following command: Navigate to `./test/Benchmarks` directory and run the following command:
<!-- markdownlint-disable MD013 -->
```sh ```sh
dotnet run --framework net6.0 --configuration Release --filter *TraceBenchmarks* dotnet run --framework net6.0 --configuration Release --filter *TraceBenchmarks*
``` ```
<!-- markdownlint-enable MD013 -->

View File

@ -30,7 +30,6 @@ Use the `ENTER` key to print the latest performance statistics.
Use the `ESC` key to exit the stress test. Use the `ESC` key to exit the stress test.
<!-- markdownlint-disable MD013 -->
```text ```text
Running (concurrency = 1), press <Esc> to stop... Running (concurrency = 1), press <Esc> to stop...
2021-09-28T18:47:17.6807622Z Loops: 17,549,732,467, Loops/Second: 738,682,519, CPU Cycles/Loop: 3 2021-09-28T18:47:17.6807622Z Loops: 17,549,732,467, Loops/Second: 738,682,519, CPU Cycles/Loop: 3
@ -40,7 +39,6 @@ Running (concurrency = 1), press <Esc> to stop...
2021-09-28T18:47:18.5052989Z Loops: 18,150,598,194, Loops/Second: 733,026,161, CPU Cycles/Loop: 3 2021-09-28T18:47:18.5052989Z Loops: 18,150,598,194, Loops/Second: 733,026,161, CPU Cycles/Loop: 3
2021-09-28T18:47:18.7116733Z Loops: 18,299,461,007, Loops/Second: 724,950,210, CPU Cycles/Loop: 3 2021-09-28T18:47:18.7116733Z Loops: 18,299,461,007, Loops/Second: 724,950,210, CPU Cycles/Loop: 3
``` ```
<!-- markdownlint-enable MD013 -->
The stress test metrics are exposed via The stress test metrics are exposed via
[PrometheusExporter](../../src/OpenTelemetry.Exporter.Prometheus/README.md), [PrometheusExporter](../../src/OpenTelemetry.Exporter.Prometheus/README.md),