Skip to content

Commit

Permalink
Documentation - allow long lines for tables and code blocks (#3049)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek authored Mar 15, 2022
1 parent a709cfd commit dff9ade
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,12 @@ helper methods.
in each framework that you target.
* Add the following lines to your csproj:

<!-- markdownlint-disable MD013 -->
```xml
<ItemGroup>
<AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Shipped.txt" />
<AdditionalFiles Include=".publicApi\$(TargetFramework)\PublicAPI.Unshipped.txt" />
</ItemGroup>
```
<!-- markdownlint-enable MD013 -->

* Use
[IntelliSense](https://docs.microsoft.com/visualstudio/ide/using-intellisense)
Expand Down
4 changes: 0 additions & 4 deletions docs/metrics/customizing-the-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ are then aggregated using the custom boundaries provided instead of the the
default boundaries. This requires the use of
`ExplicitBucketHistogramConfiguration`.

<!-- markdownlint-disable MD013 -->
```csharp
// Change Histogram boundaries to count measurements under the following buckets:
// (-inf, 10]
Expand All @@ -258,7 +257,6 @@ default boundaries. This requires the use of
instrumentName: "MyHistogram",
new ExplicitBucketHistogramConfiguration { Boundaries = new double[] { } })
```
<!-- markdownlint-enable MD013 -->

```csharp
// Advanced selection criteria and config via Func<Instrument, MetricStreamConfiguration>
Expand Down Expand Up @@ -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
these `MetricStream`s to `3`.

<!-- markdownlint-disable MD013 -->
```csharp
using System.Collections.Generic;
using System.Diagnostics.Metrics;
Expand Down Expand Up @@ -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(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
streams. There is no ability to apply different limits for each instrument at
Expand Down
2 changes: 0 additions & 2 deletions docs/metrics/getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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),
similar to shown below:

<!-- markdownlint-disable MD013 -->
```text
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
Expand All @@ -41,7 +40,6 @@ Value: 7
(2021-09-23T22:00:08.4399776Z, 2021-09-23T22:00:08.4510115Z] color:green name:apple LongSum
Value: 2
```
<!-- markdownlint-enable MD013 -->

Congratulations! You are now collecting metrics using OpenTelemetry.

Expand Down
2 changes: 0 additions & 2 deletions docs/trace/reporting-exceptions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ one possible way of doing this:
**WARNING:** Use `AppDomain.UnhandledException` with caution. A throw in the
handler puts the process into an unrecoverable state.

<!-- markdownlint-disable MD013 -->
```csharp
using System;
using System.Diagnostics;
Expand Down Expand Up @@ -191,4 +190,3 @@ public class Program
}
}
```
<!-- markdownlint-enable MD013 -->
2 changes: 0 additions & 2 deletions src/OpenTelemetry.Api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,13 +460,11 @@ for versions lower than `.NET Framework 4.6.1`.
1. Install the `System.Diagnostics.DiagnosticSource` package version
`6.0.0` or above to your application or library.

<!-- markdownlint-disable MD013 -->
```xml
<ItemGroup>
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="6.0.0" />
</ItemGroup>
```
<!-- markdownlint-enable MD013 -->

2. Create a `Meter`, providing the name and version of the library/application
doing the instrumentation. The `Meter` instance is typically created once and
Expand Down
2 changes: 0 additions & 2 deletions src/OpenTelemetry.Exporter.Jaeger/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,12 @@ The following environment variables can be used to override the default
values of the `JaegerExporterOptions`
(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 |
|-----------------------------------|-----------------------------------------------------------|
| `OTEL_EXPORTER_JAEGER_AGENT_HOST` | `AgentHost` |
| `OTEL_EXPORTER_JAEGER_AGENT_PORT` | `AgentPort` |
| `OTEL_EXPORTER_JAEGER_ENDPOINT` | `Endpoint` |
| `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
supported environment variables.
Expand Down
4 changes: 0 additions & 4 deletions src/OpenTelemetry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,12 @@ purposes, the SDK provides the following built-in processors:
The following environment variables can be used to override the default
values of the `BatchExportActivityProcessorOptions`.

<!-- markdownlint-disable MD013 -->
| Environment variable | `BatchExportActivityProcessorOptions` property |
| -------------------------------- | ---------------------------------------------- |
| `OTEL_BSP_SCHEDULE_DELAY` | `ScheduledDelayMilliseconds` |
| `OTEL_BSP_EXPORT_TIMEOUT` | `ExporterTimeoutMilliseconds` |
| `OTEL_BSP_MAX_QUEUE_SIZE` | `MaxQueueSize` |
| `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` | `MaxExportBatchSizeEnvVarKey` |
<!-- markdownlint-enable MD013 -->

`FormatException` is thrown in case of an invalid value for any of the
supported environment variables.
Expand Down Expand Up @@ -265,12 +263,10 @@ using var tracerProvider = Sdk.CreateTracerProviderBuilder()
It is also possible to configure the `Resource` by using following
environmental variables:

<!-- markdownlint-disable MD013 -->
| 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_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

Expand Down
2 changes: 0 additions & 2 deletions test/Benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Use the following example to run Benchmarks from command line:

Navigate to `./test/Benchmarks` directory and run the following command:

<!-- markdownlint-disable MD013 -->
```sh
dotnet run --framework net6.0 --configuration Release --filter *TraceBenchmarks*
```
<!-- markdownlint-enable MD013 -->
2 changes: 0 additions & 2 deletions test/OpenTelemetry.Tests.Stress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Use the `ENTER` key to print the latest performance statistics.

Use the `ESC` key to exit the stress test.

<!-- markdownlint-disable MD013 -->
```text
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
Expand All @@ -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.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
[PrometheusExporter](../../src/OpenTelemetry.Exporter.Prometheus/README.md),
Expand Down

0 comments on commit dff9ade

Please sign in to comment.