Skip to content

Commit 7bf365a

Browse files
authored
Merge branch 'main' into signing_with_cosign
2 parents 413f640 + 19e1663 commit 7bf365a

File tree

139 files changed

+1220
-623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+1220
-623
lines changed

.editorconfig

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ csharp_indent_labels = flush_left
4141

4242
# Modifier preferences
4343
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion
44-
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
44+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
4545

4646
# this. preferences
4747
dotnet_style_qualification_for_field = true:suggestion
@@ -53,8 +53,8 @@ dotnet_style_qualification_for_event = true:suggestion
5353
csharp_style_var_for_built_in_types = true:silent
5454
csharp_style_var_when_type_is_apparent = true:silent
5555
csharp_style_var_elsewhere = true:silent
56-
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
57-
dotnet_style_predefined_type_for_member_access = true:silent
56+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
57+
dotnet_style_predefined_type_for_member_access = true:suggestion
5858

5959
# name all constant fields using PascalCase
6060
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
@@ -75,28 +75,31 @@ dotnet_style_readonly_field = true:suggestion
7575
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
7676
dotnet_style_prefer_simplified_interpolation = true:suggestion
7777
dotnet_style_object_initializer = true:suggestion
78+
csharp_style_prefer_primary_constructors = false:none
7879

7980
# Expression-level preferences
8081
dotnet_style_object_initializer = true:suggestion
8182
dotnet_style_collection_initializer = true:suggestion
8283
dotnet_style_explicit_tuple_names = true:suggestion
8384
dotnet_style_coalesce_expression = true:suggestion
8485
dotnet_style_null_propagation = true:suggestion
85-
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
86+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
8687
dotnet_style_prefer_inferred_tuple_names = true:suggestion
8788
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
88-
dotnet_style_prefer_auto_properties = true:silent
89-
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
90-
dotnet_style_prefer_conditional_expression_over_return = true:silent
89+
dotnet_style_prefer_auto_properties = true:suggestion
90+
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
91+
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
9192
csharp_prefer_simple_default_expression = true:suggestion
93+
csharp_style_unused_value_expression_statement_preference = discard_variable:none
9294

9395
# Expression-bodied members
94-
csharp_style_expression_bodied_methods = false:silent
95-
csharp_style_expression_bodied_constructors = false:silent
96-
csharp_style_expression_bodied_operators = false:silent
97-
csharp_style_expression_bodied_properties = true:silent
98-
csharp_style_expression_bodied_indexers = true:silent
99-
csharp_style_expression_bodied_accessors = true:silent
96+
csharp_style_expression_bodied_methods = true:suggestion
97+
dotnet_diagnostic.IDE0022.severity = suggestion # dotnet format doesn't respect the suggestion in the line above
98+
csharp_style_expression_bodied_constructors = false:warning
99+
csharp_style_expression_bodied_operators = true:suggestion
100+
csharp_style_expression_bodied_properties = true:suggestion
101+
csharp_style_expression_bodied_indexers = true:suggestion
102+
csharp_style_expression_bodied_accessors = true:suggestion
100103

101104
# Pattern matching
102105
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
@@ -113,6 +116,7 @@ csharp_style_prefer_range_operator = false:none
113116
csharp_style_pattern_local_over_anonymous_function = true:suggestion
114117
csharp_style_deconstructed_variable_declaration = true:suggestion
115118
csharp_style_namespace_declarations = file_scoped:warning
119+
dotnet_style_namespace_match_folder = false:none
116120

117121
# Space preferences
118122
csharp_space_after_cast = false
@@ -128,10 +132,10 @@ csharp_space_between_method_declaration_parameter_list_parentheses = false
128132
csharp_space_between_parentheses = false
129133

130134
# Parentheses preferences
131-
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
132-
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
133-
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
134-
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
135+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
136+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
137+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
138+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
135139

136140
# Code analyzers
137141
# CA1031: Do not catch general exception types

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ body:
4848
- type: input
4949
attributes:
5050
label: Runtime Version
51-
description: What .NET runtime version did you use? (e.g. `net462`, `net48`, `netcoreapp3.1`, `net6.0` etc. You can find this information from the `*.csproj` file)
51+
description: What .NET runtime version did you use? (e.g. `net462`, `net48`, `net8.0`, etc. You can find this information from the `*.csproj` file)
5252
validations:
5353
required: true
5454

.github/workflows/Component.BuildTest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424
required: false
2525
type: string
2626
tfm-list:
27-
default: '[ "net462", "net6.0", "net8.0" ]'
27+
default: '[ "net462", "net8.0", "net9.0" ]'
2828
required: false
2929
type: string
3030

@@ -42,7 +42,7 @@ jobs:
4242
- os: otel-linux-arm64
4343
version: net462
4444
- os: otel-linux-arm64
45-
version: net6.0
45+
version: net8.0
4646

4747
runs-on: ${{ matrix.os }}
4848
steps:

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
strategy:
112112
fail-fast: false
113113
matrix:
114-
version: [ net6.0, net8.0 ]
114+
version: [ net8.0, net9.0 ]
115115
steps:
116116
- uses: actions/checkout@v4
117117
- name: Run OTLP Exporter docker compose
@@ -129,7 +129,7 @@ jobs:
129129
strategy:
130130
fail-fast: false
131131
matrix:
132-
version: [ net6.0, net8.0 ]
132+
version: [ net8.0, net9.0 ]
133133
steps:
134134
- uses: actions/checkout@v4
135135
- name: Run W3C Trace Context docker compose

.github/workflows/docfx.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
- name: check out code
1414
uses: actions/checkout@v4
1515

16+
- name: Setup dotnet
17+
uses: actions/setup-dotnet@v4
18+
1619
- name: install docfx
1720
run: dotnet tool install -g docfx
1821

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
close-pr-message: 'Closed as inactive. Feel free to reopen if this PR is still being worked on.'
1919
operations-per-run: 400
2020
days-before-pr-stale: 7
21-
days-before-issue-stale: 900
21+
days-before-issue-stale: 600
2222
days-before-pr-close: 7
2323
days-before-issue-close: 7
2424
exempt-all-issue-milestones: true

.github/workflows/verifyaotcompat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
1313
matrix:
1414
os: [ ubuntu-latest, windows-latest ]
15-
version: [ net8.0 ]
15+
version: [ net8.0, net9.0 ]
1616

1717
runs-on: ${{ matrix.os }}
1818
steps:

CONTRIBUTING.md

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ for a summary description of past meetings. To request edit access, join the
1010
meeting or get in touch on
1111
[Slack](https://cloud-native.slack.com/archives/C01N3BC2W7Q).
1212

13-
Even though, anybody can contribute, there are benefits of being a member of our
14-
community. See to the [community membership
13+
Anyone may contribute but there are benefits of being a member of our community.
14+
See the [community membership
1515
document](https://github.com/open-telemetry/community/blob/main/community-membership.md)
1616
on how to become a
1717
[**Member**](https://github.com/open-telemetry/community/blob/main/community-membership.md#member),
1818
[**Approver**](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
1919
and
2020
[**Maintainer**](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
2121

22-
## Find a Buddy and Get Started Quickly
22+
## Find a buddy and get started quickly
2323

2424
If you are looking for someone to help you find a starting point and be a
2525
resource for your first contribution, join our Slack channel and find a buddy!
@@ -34,17 +34,24 @@ resource for your first contribution, join our Slack channel and find a buddy!
3434

3535
Your OpenTelemetry buddy is your resource to talk to directly on all aspects of
3636
contributing to OpenTelemetry: providing context, reviewing PRs, and helping
37-
those get merged. Buddies will not be available 24/7, but is committed to
38-
responding during their normal contribution hours.
37+
those get merged. Buddies will not be available 24/7, but are committed to
38+
responding during their normal working hours.
3939

4040
## Development Environment
4141

42-
You can contribute to this project from a Windows, macOS or Linux machine.
42+
You can contribute to this project from a Windows, macOS, or Linux machine.
4343

4444
On all platforms, the minimum requirements are:
4545

46-
* Git client and command line tools.
47-
* .NET 8.0
46+
* Git client and command line tools
47+
48+
* [.NET SDK (latest stable version)](https://dotnet.microsoft.com/download)
49+
50+
> [!NOTE]
51+
> At times a pre-release version of the .NET SDK may be required to build code
52+
in this repository. Check
53+
[global.json](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/global.json)
54+
to verify the current required version.
4855

4956
### Linux or MacOS
5057

@@ -59,7 +66,7 @@ of Windows.
5966
* Visual Studio 2022+ or Visual Studio Code
6067
* .NET Framework 4.6.2+
6168

62-
### Public API Validation
69+
## Public API validation
6370

6471
It is critical to **NOT** make breaking changes to public APIs which have been
6572
released in stable builds. We also strive to keep a minimal public API surface.
@@ -91,9 +98,9 @@ to validate public APIs.
9198
[Common.prod.props](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/build/Common.prod.props)
9299
(please do not check in this change).
93100

94-
#### Working with Microsoft.CodeAnalysis.PublicApiAnalyzers
101+
### Working with Microsoft.CodeAnalysis.PublicApiAnalyzers
95102

96-
##### Update public API files when writing code
103+
#### Update public API files when writing code
97104

98105
[IntelliSense](https://docs.microsoft.com/visualstudio/ide/using-intellisense)
99106
will [suggest
@@ -116,7 +123,7 @@ do this by:
116123
while performing stable releases. If you need help reach out to an approver or
117124
maintainer on Slack or open a draft PR.
118125

119-
##### Enable public API validation in new projects
126+
#### Enable public API validation in new projects
120127

121128
1. If you are **NOT** using experimental APIs:
122129
* If your API is the same across all target frameworks:
@@ -144,12 +151,12 @@ do this by:
144151

145152
## Pull Requests
146153

147-
### How to Send Pull Requests
154+
### How to create pull requests
148155

149156
Everyone is welcome to contribute code to `opentelemetry-dotnet` via GitHub pull
150157
requests (PRs).
151158

152-
To create a new PR, fork the project in GitHub and clone the upstream repo:
159+
To create a new PR, fork the project on GitHub and clone the upstream repo:
153160

154161
```sh
155162
git clone https://github.com/open-telemetry/opentelemetry-dotnet.git
@@ -180,7 +187,7 @@ If you made changes to the Markdown documents (`*.md` files), install the latest
180187
markdownlint .
181188
```
182189

183-
Check out a new branch, make modifications and push the branch to your fork:
190+
Check out a new branch, make modifications, and push the branch to your fork:
184191

185192
```sh
186193
$ git checkout -b feature
@@ -191,7 +198,7 @@ $ git push fork feature
191198

192199
Open a pull request against the main `opentelemetry-dotnet` repo.
193200

194-
### How to Receive Comments
201+
#### Tips and best practices for pull requests
195202

196203
* If the PR is not ready for review, please mark it as
197204
[`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
@@ -204,26 +211,29 @@ Open a pull request against the main `opentelemetry-dotnet` repo.
204211
* Include benchmarks (before/after) in the summary, for contributions that are
205212
performance enhancements.
206213

207-
### How to Get PRs Merged
214+
### How to get pull requests merged
208215

209216
A PR is considered to be **ready to merge** when:
210217

211218
* It has received approval from
212219
[Approvers](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver).
213220
/
214221
[Maintainers](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
215-
* Major feedbacks are resolved.
222+
* Major feedback/comments are resolved.
216223
* It has been open for review for at least one working day. This gives people
217224
reasonable time to review.
218-
* Trivial change (typo, cosmetic, doc, etc.) doesn't have to wait for one day.
219-
* Urgent fix can take exception as long as it has been actively communicated.
225+
* Trivial change (typo, cosmetic, doc, etc.) doesn't have to wait for one day.
226+
* Urgent fix can take exception as long as it has been actively communicated.
220227

221-
Any Maintainer can merge the PR once it is **ready to merge**. Note, that some
222-
PRs may not be merged immediately if the repo is in the process of a release and
223-
the maintainers decided to defer the PR to the next release train.
228+
Any maintainer can merge PRs once they are **ready to merge** however
229+
maintainers might decide to wait on merging changes until there are more
230+
approvals and/or dicussion, or based on other factors such as release timing and
231+
risk to users. For example if a stable release is planned and a new change is
232+
introduced adding public API(s) or behavioral changes it might be held until the
233+
next alpha/beta release.
224234

225-
If a PR has been stuck (e.g. there are lots of debates and people couldn't agree
226-
on each other), the owner should try to get people aligned by:
235+
If a PR has become stuck (e.g. there is a lot of debate and people couldn't
236+
agree on the direction), the owner should try to get people aligned by:
227237

228238
* Consolidating the perspectives and putting a summary in the PR. It is
229239
recommended to add a link into the PR description, which points to a comment
@@ -238,15 +248,15 @@ on each other), the owner should try to get people aligned by:
238248
the owner should bring it to the OpenTelemetry .NET SIG
239249
[meeting](README.md#contributing).
240250

241-
## Design Choices
251+
## Design choices
242252

243253
As with other OpenTelemetry clients, opentelemetry-dotnet follows the
244254
[opentelemetry-specification](https://github.com/open-telemetry/opentelemetry-specification).
245255

246256
It's especially valuable to read through the [library
247257
guidelines](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/library-guidelines.md).
248258

249-
### Focus on Capabilities, Not Structure Compliance
259+
### Focus on capabilities not structural compliance
250260

251261
OpenTelemetry is an evolving specification, one where the desires and use cases
252262
are clear, but the method to satisfy those uses cases are not.
@@ -260,10 +270,10 @@ than conform to specific API names or argument patterns in the spec.
260270
For a deeper discussion, see [this spec
261271
issue](https://github.com/open-telemetry/opentelemetry-specification/issues/165).
262272

263-
## Style Guide
273+
## Style guide
264274

265275
This project includes a [`.editorconfig`](./.editorconfig) file which is
266-
supported by all the IDEs/editor mentioned above. It works with the IDE/editor
276+
supported by all the IDEs/editors mentioned above. It works with the IDE/editor
267277
only and does not affect the actual build of the project.
268278

269279
This repository also includes StyleCop ruleset files under the `./build` folder.

0 commit comments

Comments
 (0)