Skip to content

Commit

Permalink
Add markdownlint (#556)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kielek authored Apr 20, 2022
1 parent e21270d commit 8e8bda8
Show file tree
Hide file tree
Showing 20 changed files with 888 additions and 199 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ updates:
interval: "daily"


- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'


- package-ecosystem: nuget
directory: /build/nuke
schedule:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: markdownlint

on:
push:
branches: [ main ]
paths:
- '**.md'
- 'package-lock.json'
- 'package.json'
pull_request:
branches: [ main ]
paths:
- '**.md'
- 'package-lock.json'
- 'package.json'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/[email protected]

- run: npm install

- run: npm run markdownlint
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ __pycache__/
*.pyc

# vscode
.vscode/
.vscode/*
!.vscode/extensions.json
.devcontainer/

# Benchmark results
Expand Down
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
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"davidanson.vscode-markdownlint",
]
}
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
The is an initial, official beta release,
built on top of [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):

- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components): [`1.2.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.2.0)
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
[`1.2.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.2.0)
- Non-core components: [`1.0.0-rc9.2`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/1.0.0-rc9.2)
- `System.Diagnostics.DiagnosticSource`: [`6.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/6.0.0)

Expand Down
24 changes: 24 additions & 0 deletions build/nuke/Build.Steps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.MSBuild;
using Nuke.Common.Tools.Npm;
using Nuke.Common.Tools.NuGet;
using Nuke.Common.Utilities.Collections;
using Serilog;
Expand Down Expand Up @@ -353,6 +354,29 @@ partial class Build
});
});

Target InstallMarkdownLint => _ => _
.Description("Installs markdownlint-cli locally. npm is required")
.Executes(() =>
{
NpmTasks.NpmInstall();
});

Target MarkdownLint => _ => _
.Description("Executes MarkdownLint")
.After(InstallMarkdownLint)
.Executes(() =>
{
NpmTasks.NpmRun(s => s.SetCommand(@"markdownlint"));
});

Target MarkdownLintFix => _ => _
.Description("Trying to fix MarkdownLint issues")
.After(InstallMarkdownLint)
.Executes(() =>
{
NpmTasks.NpmRun(s => s.SetCommand(@"markdownlint-fix"));
});

private AbsolutePath GetResultsDirectory(Project proj) => BuildDataDirectory / "results" / proj.Name;

/// <summary>
Expand Down
10 changes: 6 additions & 4 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

We'd love your help!

Please join our weekly [SIG meeting](https://github.com/open-telemetry/community#special-interest-groups) or get in touch on [Slack](https://cloud-native.slack.com/archives/C01NR1YLSE7).
Please join our weekly [SIG meeting](https://github.com/open-telemetry/community#special-interest-groups)
or get in touch on [Slack](https://cloud-native.slack.com/archives/C01NR1YLSE7).

Meeting notes are available as a public [Google
doc](https://docs.google.com/document/d/1XedN2D8_PH4YLej-maT8sp4RKogfuhFpccRi3QpUcoI/edit?usp=sharing).
Expand All @@ -22,7 +23,7 @@ Reporting bugs is an important contribution. Please make sure to include:
If you would like to work on something that is not listed as an issue
(e.g. a new feature or enhancement) please first read our [DESIGN.md](DESIGN.md)
to make sure your proposal aligns with the goals of the
project, then create an issue and describe your proposal.
project, then create an issue and describe your proposal.

## How to contribute

Expand All @@ -40,8 +41,9 @@ clarify anything related to it.

If you would like to work on something that is not listed as an issue,
please [request a feature](#request-a-feature) first.
It is best to do this in advance so that maintainers can decide if the proposal is a good fit for
this repository. This will help avoid situations when you spend significant time
It is best to do this in advance so that maintainers can decide if the proposal
is a good fit for this repository.
This will help avoid situations when you spend significant time
on something that maintainers may decide this repo is not the right place for.

See [developing.md](developing.md) to learn more about
Expand Down
6 changes: 4 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ to .NET applications without having to modify their source code.

OpenTelemetry .NET Automatic Instrumentation is built on top of [OpenTelemetry .NET](https://github.com/open-telemetry/opentelemetry-dotnet):

- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components): [`1.2.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.2.0)
- [Core components](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/VERSIONING.md#core-components):
[`1.2.0`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.2.0)
- Non-core components: [`1.0.0-rc9.2`](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/1.0.0-rc9.2)
- `System.Diagnostics.DiagnosticSource`: [`6.0.0`](https://www.nuget.org/packages/System.Diagnostics.DiagnosticSource/6.0.0)

To automatically instrument applications, the OpenTelemetry .NET Automatic Instrumentation does the following:
To automatically instrument applications, the OpenTelemetry .NET Automatic
Instrumentation does the following:

1. Injects and configures the [OpenTelemetry .NET SDK](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry/README.md#opentelemetry-net-sdk)
into the application.
Expand Down
21 changes: 12 additions & 9 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
| `OTEL_DOTNET_AUTO_INCLUDE_PROCESSES` | Names of the executable files that the profiler can instrument. Supports multiple comma-separated values, for example: `MyApp.exe,dotnet.exe`. If unset, the profiler attaches to all processes by default. | |
| `OTEL_DOTNET_AUTO_EXCLUDE_PROCESSES` | Names of the executable files that the profiler cannot instrument. Supports multiple comma-separated values, for example: `ReservedProcess.exe,powershell.exe`. The list is processed after `OTEL_DOTNET_AUTO_INCLUDE_PROCESSES`. If unset, the profiler attaches to all processes by default. | |
| `OTEL_DOTNET_AUTO_AZURE_APP_SERVICES` | Set to indicate that the profiler is running in the context of Azure App Services. | `false` |


## Resources

Expand Down Expand Up @@ -49,7 +48,8 @@ for more details.
ASP.NET instrumentation on .NET Framework requires to install the
[`OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule`](https://www.nuget.org/packages/OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule/)
NuGet package in the instrumented project.
See [the WebConfig section](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Instrumentation.AspNet#step-2-modify-webconfig) for more information.
See [the WebConfig section](https://github.com/open-telemetry/opentelemetry-dotnet/tree/main/src/OpenTelemetry.Instrumentation.AspNet#step-2-modify-webconfig)
for more information.

## Logging

Expand All @@ -59,7 +59,8 @@ The default log directory paths are:
- Linux: `/var/log/opentelemetry/dotnet`

If the default log directories can't be created,
the instrumentation uses the path of the current user's [temporary folder](https://docs.microsoft.com/en-us/dotnet/api/System.IO.Path.GetTempPath?view=net-6.0) instead.
the instrumentation uses the path of the current user's [temporary folder](https://docs.microsoft.com/en-us/dotnet/api/System.IO.Path.GetTempPath?view=net-6.0)
instead.

| Environment variable | Description | Default |
|-|-|-|
Expand Down Expand Up @@ -89,8 +90,9 @@ Exporters output the telemetry.
**[1]**: Considerations on the `OTEL_EXPORTER_OTLP_PROTOCOL`:

- On .NET 5 and higher, the application must reference [`Grpc.Net.Client`](https://www.nuget.org/packages/Grpc.Net.Client/)
to use the `grpc` OTLP exporter protocol. For example, by adding
`<PackageReference Include="Grpc.Net.Client" Version="2.32.0" />` to the `.csproj` file.
to use the `grpc` OTLP exporter protocol. For example, by adding
`<PackageReference Include="Grpc.Net.Client" Version="2.32.0" />` to the `.csproj`
file.
- On .NET Framework, the `grpc` OTLP exporter protocol is not supported.

## Batch span processor
Expand All @@ -114,7 +116,6 @@ The batch span processor batches finished spans before sending them through the
| `OTEL_DOTNET_AUTO_FLUSH_ON_UNHANDLEDEXCEPTION` | Controls whether the telemetry data is flushed when an [AppDomain.UnhandledException](https://docs.microsoft.com/en-us/dotnet/api/system.appdomain.unhandledexception) event is raised. Set to `true` when you suspect that you are experiencing a problem with missing telemetry data and also experiencing unhandled exceptions. | `false` |
| `OTEL_DOTNET_AUTO_INSTRUMENTATION_PLUGINS` | Colon-separated list of OTel SDK instrumentation plugins represented by `System.Type.AssemblyQualifiedName`. | |


You can use `OTEL_DOTNET_AUTO_INSTRUMENTATION_PLUGINS` to extend the
configuration of the OpenTelemetry .NET SDK Tracer. A plugin must be a
non-static, non-abstract class which has a default constructor and a method
Expand All @@ -131,7 +132,7 @@ OpenTelemetry .NET Automatic Instrumentation.

To perform bytecode instrumentation, configure the OpenTelemetry .NET
Automatic Instrumentation as a .NET CLR Profiler. The CLR uses the following
environment variables to set up the profiler.
environment variables to set up the profiler.

> Notice that .NET Framework uses the `COR_` prefix instead of `CORECLR_`.
Expand All @@ -143,9 +144,11 @@ environment variables to set up the profiler.
| `CORECLR_PROFILER_PATH_32` | Path to the 32-bit profiler. Bitness-specific paths take precedence over generic paths. | `%InstallationLocation%/win-x86/OpenTelemetry.AutoInstrumentation.Native.dll` for Windows |
| `CORECLR_PROFILER_PATH_64` | Path to the 64-bit profiler. Bitness-specific paths take precedence over generic paths. | `%InstallationLocation%/win-x64/OpenTelemetry.AutoInstrumentation.Native.dll` for Windows |

The `*_PROFILER_PATH_*` environment variable is not needed on Windows if the DLL file is already registered.
The `*_PROFILER_PATH_*` environment variable is not needed on Windows if the DLL
file is already registered.

See [.NET Runtime Profiler Loading](https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/profiling/Profiler%20Loading.md) for more information.
See [.NET Runtime Profiler Loading](https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/profiling/Profiler%20Loading.md)
for more information.

## .NET Runtime additional dependencies and package store

Expand Down
Loading

0 comments on commit 8e8bda8

Please sign in to comment.