Compare commits

...

170 Commits

Author SHA1 Message Date
Martin Costello f153e130b4
[Infra] Fix issue templates (#6455)
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
2025-09-04 10:06:15 -07:00
dependabot[bot] b659171101
Bump github/codeql-action from 3.29.11 to 3.30.0 (#6460)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-03 07:21:26 -07:00
Martin Costello 2a9c406b6d
[Infra] Simplify span slicing (#6456) 2025-08-28 12:14:14 -07:00
Martin Costello bab4b954cd
[OpenTelemetry] Fix assertion failures in debug (#6304)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-08-28 09:10:46 -07:00
OpenTelemetry Bot cd522d9081
Add subscript to issue templates (#6423)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
Co-authored-by: Cijo Thomas <cijo.thomas@gmail.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-08-26 11:46:52 -07:00
Martin Costello 8321588b28
[infra] Use Artifacts Output layout (#6301)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-08-25 13:44:57 -07:00
dependabot[bot] 62162211ad
Bump github/codeql-action from 3.29.10 to 3.29.11 (#6450)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-25 09:02:49 -07:00
Martin Costello 7a4643a829
[OTLP] Set TE header for gRPC calls (#6449) 2025-08-22 08:39:37 -07:00
dependabot[bot] 84b3ca4e11
Bump codecov/codecov-action from 5.4.3 to 5.5.0 (#6448)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-20 11:59:43 -07:00
dependabot[bot] 0ebe718c70
Bump github/codeql-action from 3.29.6 to 3.29.10 (#6445)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
2025-08-19 10:38:26 -07:00
dependabot[bot] a871f0fc68
Bump github/codeql-action from 3.29.6 to 3.29.9 (#6436)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-08-18 10:41:17 -07:00
dependabot[bot] 44f46b1656
Bump actions/checkout from 4.2.2 to 5.0.0 (#6437)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-08-18 10:01:09 -07:00
Martin Costello ca892e44a9
[Infra] Pin aiohttp (#6442)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-08-18 09:46:03 -07:00
dependabot[bot] a067b8f437
Bump ubuntu from `a08e551` to `7c06e91` in /test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests (#6438)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-08-18 09:27:49 -07:00
dependabot[bot] 2e73a2c468
Bump dotnet/aspnet from `6d8901f` to `6d40ae7` in /examples/MicroserviceExample/WebApi (#6439)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-08-18 09:04:16 -07:00
dependabot[bot] 4bab51a01a
Bump dotnet/sdk from `45e41fe` to `7fd287c` in /examples/MicroserviceExample/WebApi (#6440)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-15 17:16:31 -07:00
dependabot[bot] 81f29e6068
Bump github/codeql-action from 3.29.5 to 3.29.6 (#6433)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-08-07 21:41:44 -07:00
dependabot[bot] 583166cc71
Bump dotnet/aspnet from 8.0.18 to 8.0.19 in /examples/MicroserviceExample/WebApi (#6429)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: martincostello <martin@martincostello.com>
2025-08-07 20:59:46 -07:00
dependabot[bot] e2fdf99f52
Bump dotnet/sdk from 8.0.412 to 8.0.413 in /examples/MicroserviceExample/WebApi (#6428)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-06 22:48:22 -07:00
Cijo Thomas d2f8e54bb9
Self-diagnostics - support formatted message for better human readability (#6411)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-08-05 10:25:11 -07:00
dependabot[bot] 27234c2a14
Bump github/codeql-action from 3.29.4 to 3.29.5 (#6419)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 02:25:38 -07:00
Martin Costello 6b58da89e2
[Infra] Bump Cosign to v2.5.3 (#6417) 2025-07-30 10:03:29 -07:00
Martin Costello accfea63fe
[Infra] Improve CodeQL analysis (#6415)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-30 08:33:23 -07:00
Martin Costello 570a6fa687
[OTLP] Dispose exporter if setup fails (#6398)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-30 06:40:11 -07:00
Martin Costello 4dc60007ca
[Infra] Exclude keep-open label from stale (#6413)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-30 05:41:00 -07:00
Piotr Kiełkowicz e67ecf8164
[docs] Contributing - reporting bug/feature requests (#6414) 2025-07-30 05:26:53 -07:00
Piotr Kiełkowicz 98a8d38e8a
[infra] use env. var. to read github body comment (#6409) 2025-07-25 08:26:46 -07:00
dependabot[bot] e5b9a9a3db
Bump dotnet-sdk from 9.0.302 to 9.0.303 (#6402)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
2025-07-24 22:53:27 -07:00
OpenTelemetry Bot be60150962
[infra] Add minimum token permissions for all github workflow files (#6357)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-24 03:50:45 -07:00
dependabot[bot] 7f111ea831
Bump dotnet/aspnet from `35095f3` to `fbc9110` in /examples/MicroserviceExample/WorkerService (#6399)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-24 01:49:19 -07:00
dependabot[bot] a8ef3e1888
Bump dotnet/sdk from `e6748a3` to `4763fe4` in /examples/MicroserviceExample/WorkerService (#6400)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-24 01:34:33 -07:00
dependabot[bot] 9480cb3e9a
Bump github/codeql-action from 3.29.3 to 3.29.4 (#6401)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-24 01:33:27 -07:00
dependabot[bot] b921486b67
Bump ubuntu from `c4570d2` to `a08e551` in /test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests (#6403)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-24 01:17:54 -07:00
dependabot[bot] 5ff15e58c1
Bump dotnet/sdk from `e6748a3` to `4763fe4` in /test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests (#6404)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-24 00:51:20 -07:00
dependabot[bot] 872ab2b80c
Bump dotnet/sdk from `e6748a3` to `4763fe4` in /test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest (#6405)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-24 00:42:27 -07:00
dependabot[bot] 21af34df63
Bump dotnet/sdk from `3da7c41` to `3da7c41` in /examples/MicroserviceExample/WebApi (#6406)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-24 00:32:51 -07:00
dependabot[bot] 2b20ffc1ed
Bump dotnet/aspnet from `35095f3` to `fbc9110` in /examples/MicroserviceExample/WebApi (#6407)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-23 22:38:36 -07:00
Paulo Morgado 7ccfda242a
Refactor serialization error handling and buffer logic (#6392) 2025-07-22 13:07:42 -07:00
dependabot[bot] 6f805344dd
Bump github/codeql-action from 3.29.2 to 3.29.3 (#6393)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 19:37:30 -07:00
Martin Costello d8dfaa84a3
[OTLP] Refactor ProtobufSerializer.WriteReservedLength() to improve performance (#6367) 2025-07-21 06:16:07 -07:00
Martin Costello 361a1655b9
[Infra] Remove AssemblyInfo files (#6382)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-21 05:55:14 -07:00
Cijo Thomas a2679d5a6d
Improve Console Metric Exporter Output (#6388)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
2025-07-21 03:50:00 -07:00
Cijo Thomas 0ad46df6cf
Add Martin Costello as Approver (#6383)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-07-19 23:19:19 -07:00
dependabot[bot] 393b5e04f3
Bump sigstore/cosign-installer from 3.9.1 to 3.9.2 (#6390)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-19 22:34:48 -07:00
dependabot[bot] 5963d1d710
Bump ubuntu from `440dcf6` to `c4570d2` in /test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests (#6381)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-17 09:37:42 -07:00
Cijo Thomas afe1a5bb11
Add explicit warning on ConsoleExporter (#6385)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-17 09:28:26 -07:00
Cijo Thomas 4e9e37fa35
Slight improvement to readability to Metric ConsoleExporter (#6384) 2025-07-17 09:23:15 -07:00
Martin Costello f8dc06acf2
Remove redundant test (#6369)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-14 17:03:46 -07:00
dependabot[bot] 869d9475ef
Bump dotnet-sdk from 9.0.300 to 9.0.302 (#6374)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-14 16:53:18 -07:00
dependabot[bot] 12b994ceda
Bump dotnet/sdk from 8.0.411 to 8.0.412 in /test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests (#6370)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-14 14:44:59 -07:00
dependabot[bot] 5a89e2cfe8
Bump dotnet/aspnet from 8.0.17 to 8.0.18 in /examples/MicroserviceExample/WorkerService (#6371)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-14 14:18:22 -07:00
dependabot[bot] cd796552ef
Bump dotnet/sdk from 8.0.411 to 8.0.412 in /examples/MicroserviceExample/WorkerService (#6372)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-14 14:17:15 -07:00
dependabot[bot] 42fe0738cb
Bump dotnet/sdk from 8.0.411 to 8.0.412 in /test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest (#6373)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-14 13:02:30 -07:00
dependabot[bot] 796be6b4a9
Bump dotnet/sdk from 8.0.411 to 8.0.412 in /examples/MicroserviceExample/WebApi (#6375)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-14 11:28:51 -07:00
dependabot[bot] e58ee78c2d
Bump dotnet/aspnet from 8.0.17 to 8.0.18 in /examples/MicroserviceExample/WebApi (#6376)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-14 11:27:54 -07:00
dependabot[bot] 309ed2e7a8
Bump github/codeql-action from 3.29.1 to 3.29.2 (#6359)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-03 16:57:29 -07:00
dependabot[bot] 04a48b6033
Bump ubuntu from `b59d215` to `440dcf6` in /test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests (#6360)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-03 16:46:43 -07:00
dependabot[bot] 4eb55be9a9
Bump dotnet/sdk from `e6a5a8d` to `57c3bf9` in /test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests (#6361)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-03 16:43:59 -07:00
dependabot[bot] 19afd63555
Bump dotnet/aspnet from `d5c0d91` to `68669af` in /examples/MicroserviceExample/WebApi (#6362)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-03 16:30:10 -07:00
dependabot[bot] b76121e858
Bump dotnet/sdk from `e6a5a8d` to `57c3bf9` in /examples/MicroserviceExample/WebApi (#6363)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-03 16:28:45 -07:00
dependabot[bot] b83bc6800e
Bump dotnet/sdk from `e6a5a8d` to `57c3bf9` in /test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest (#6364)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-03 16:26:36 -07:00
dependabot[bot] 7ed91a108f
Bump dotnet/aspnet from `d5c0d91` to `68669af` in /examples/MicroserviceExample/WorkerService (#6365)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-07-03 16:06:57 -07:00
dependabot[bot] 5acf77cf04
Bump dotnet/sdk from `e6a5a8d` to `57c3bf9` in /examples/MicroserviceExample/WorkerService (#6366)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-03 15:56:00 -07:00
dependabot[bot] 1479b236f7
Bump github/codeql-action from 3.29.0 to 3.29.1 (#6356)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-06-30 16:10:52 -07:00
OpenTelemetry Bot 05f74a4c36
Fix outdated community membership link (#6355)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-06-30 11:37:05 -07:00
Julius Koval a2bb510f79
Adding EventName to LogRecord (#6306)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-06-26 12:41:08 -07:00
Piotr Kiełkowicz 4f51654047
[repo] CLOMonitor - disable Artifact hub check (#6354)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-06-26 12:08:50 -07:00
Piotr Kiełkowicz bd434cc9ae
[repo] Enable analysis globally (#6344) 2025-06-26 12:05:16 -07:00
OpenTelemetry Bot e76e0f9f44
Update community member listings (#6351)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-06-25 21:54:00 -07:00
Piotr Kiełkowicz 3401b31085
[docs] Best practices badges (#6349) 2025-06-25 10:06:16 -07:00
dependabot[bot] 5f9b011c0f
Bump sigstore/cosign-installer from 3.9.0 to 3.9.1 (#6346)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-06-24 00:58:52 -07:00
Alexander Nikolaev e9cfc33fad
Add the default ports for Tempo in the example. (#6345) 2025-06-24 00:43:20 -07:00
Martin Costello 154a6dc10b
[W3C] Refactor W3C integration tests (#6328) 2025-06-19 08:49:07 -07:00
dependabot[bot] 21993b01a3
Bump dotnet/sdk from 8.0.410 to 8.0.411 in /examples/MicroserviceExample/WorkerService (#6336)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-18 11:24:20 -07:00
dependabot[bot] d324abb29d
Bump dotnet/sdk from 8.0.410 to 8.0.411 in /test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest (#6337)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-18 11:23:43 -07:00
dependabot[bot] 7cad682002
Bump dotnet/aspnet from 8.0.16 to 8.0.17 in /examples/MicroserviceExample/WebApi (#6338)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-18 11:23:23 -07:00
dependabot[bot] 52edab3c8c
Bump dotnet/sdk from 8.0.410 to 8.0.411 in /test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests (#6339)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-06-18 11:23:00 -07:00
dependabot[bot] eb0ddd1273
Bump ubuntu from `7229784` to `b59d215` in /test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests (#6322)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-06-18 06:16:29 -07:00
Martin Costello dde8f4024b
[Infra] Avoid test flakiness (#6329) 2025-06-18 05:59:15 -07:00
Martin Costello e21e9ccd24
[Infra] Remove Source Link package (#6331)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-06-18 04:29:44 -07:00
dependabot[bot] a10f955cd9
Bump sigstore/cosign-installer from 3.8.2 to 3.9.0 (#6335)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-06-18 04:03:25 -07:00
Martin Costello 6c826c7176
[Infra] Remove redundant item (#6330)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-06-18 03:11:11 -07:00
dependabot[bot] 260e25271d
Bump github/codeql-action from 3.28.19 to 3.29.0 (#6318)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-06-18 02:30:05 -07:00
dependabot[bot] f067d0db96
Bump dotnet/aspnet from 8.0.16 to 8.0.17 in /examples/MicroserviceExample/WorkerService (#6340)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-17 14:26:05 -07:00
dependabot[bot] ed26d99bf5
Bump dotnet/sdk from 8.0.410 to 8.0.411 in /examples/MicroserviceExample/WebApi (#6341)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-17 14:25:07 -07:00
Martin Costello 78a71ebbf7
[Infra] Ignore major/minor Docker updates (#6326) 2025-06-17 14:21:26 -07:00
Martin Costello 3f86f47ac3
[Infra] Ensure .NET 8 is installed (#6313) 2025-06-11 16:32:11 -07:00
Martin Costello 4e84aa72dd
[Infra] Update Dockerfiles with dependabot (#6315) 2025-06-11 16:30:26 -07:00
Martin Costello b552c7f9bf
[w3c] Remove redundant RUN command (#6312) 2025-06-09 16:59:45 -07:00
Martin Costello 74352b8769
[infra] Use PublicApiAnalyzers from NuGet.org (#6311)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-06-09 11:36:00 -07:00
Martin Costello 1f9fa9ffe7
[infra] Remove obsolete compose attribute (#6310) 2025-06-09 11:27:01 -07:00
Valerio Arena 77e73ced3c
Introducing AddLink method in TelemetrySpan (#6305)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-06-09 10:22:08 -07:00
Martin Costello 15446598f6
[infra] Avoid port conflicts in tests (#6308)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-06-07 17:21:38 -07:00
Martin Costello ec554f9eb0
[infra] Fix line endings for shell scripts (#6309) 2025-06-07 14:10:57 -07:00
Martin Costello 9ecf6b77bc
[OpenTelemetry] Fix CA1305 warning (#6299)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-06-03 21:24:57 -07:00
Martin Costello fb4bb17b34
[infra] Ensure test-threadSafety.ps1 fails (#6302)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-06-03 16:30:26 -07:00
dependabot[bot] b884697d47
Bump github/codeql-action from 3.28.18 to 3.28.19 (#6303)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 13:50:05 -07:00
Rajkumar Rangaraj d5f6732118
Update Mothra affiliation (#6298) 2025-06-02 14:07:08 -07:00
dependabot[bot] 1065e43060
Bump ossf/scorecard-action from 2.4.1 to 2.4.2 (#6297)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-30 11:54:22 -07:00
dependabot[bot] 0ad6a95bf2
Bump dotnet-sdk from 9.0.203 to 9.0.300 (#6283)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-30 09:38:20 -07:00
Piotr Kiełkowicz 3c9beb896b
[OpenTelemetry] enable analysis - part 2 - final (#6279)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-29 15:03:40 -07:00
Simão Ribeiro 7abe983ac0
Add ConnectionRefused as transient network error so gRPC retry works when collector is down (#6259)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-27 22:39:49 -07:00
dependabot[bot] 844e148f68
Bump DavidAnson/markdownlint-cli2-action from 19.1.0 to 20.0.0 (#6285)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-27 22:12:04 -07:00
StepSecurity Bot 3f9b636f06
[StepSecurity] ci: Harden GitHub Actions (#6286)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
Co-authored-by: Cijo Thomas <cijo.thomas@gmail.com>
2025-05-27 21:40:26 -07:00
dependabot[bot] 6209ed8f80
Bump codecov/test-results-action from 1.1.0 to 1.1.1 (#6293)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-25 12:21:56 -07:00
Yevhenii Solomchenko 60a3839591
[Exporter.Zipkin] Update remote endpoint and remove the peer.service attribute (#6191)
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
2025-05-23 11:41:27 -07:00
Ivan Cherkashnev 805dd6b4ab
Clean up infinite explicit bucket bounds to prevent duplicate histogram bucket output (#6290)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-05-20 14:29:45 -07:00
dependabot[bot] 6828791c61
Bump github/codeql-action from 3.28.17 to 3.28.18 (#6288)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-19 15:15:12 -07:00
dependabot[bot] c638ef67cf
Bump codecov/codecov-action from 5.4.2 to 5.4.3 (#6289)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 14:46:21 -07:00
dependabot[bot] 6420be005b
Bump fossas/fossa-action from 1.6.0 to 1.7.0 (#6284)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-16 10:25:09 -07:00
彭伟 ee720ba3a3
[otlp] Correct initial write position for gRPC in .NET Framework OTLP exporters (#6280)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-15 21:33:39 -07:00
Piotr Kiełkowicz 8c1e63894f
[OpenTelemetry] enable analysis - part 1 (#6263) 2025-05-07 22:22:15 -07:00
dependabot[bot] 9c9d8585f3
Bump github/codeql-action from 3.28.16 to 3.28.17 (#6271)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-07 16:14:08 -07:00
Martin Costello c4268fe92b
[infra] Add GitHub Actions test logger (#6272)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-05-07 15:55:11 -07:00
OpenTelemetry Bot e371d7f02d
[release] Prepare release coreunstable-1.12.0-beta.1 (#6276) 2025-05-06 16:12:11 -07:00
Piotr Kiełkowicz 24a13ab91c
[OpenTelemetry.Tests] enable analysis (#6265) 2025-04-30 11:32:32 -07:00
OpenTelemetry Bot 2ec8931fc8
[release] Core stable release 1.12.0 updates (#6269) 2025-04-29 21:56:04 -07:00
OpenTelemetry Bot a67acd87d5
[release] Prepare release core-1.12.0 (#6268)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-29 13:45:34 -07:00
Piotr Kiełkowicz ceebd456f1
[Exporter.OpenTelemetry.Protocol.Tests] enable analysis (#6264) 2025-04-25 11:55:09 -07:00
Piotr Kiełkowicz 13ed63a88c
[Exporter.OpenTelemetryProtocol] enable analysis (#6251) 2025-04-24 11:49:15 -07:00
dependabot[bot] 0252f6ca0d
Bump sigstore/cosign-installer from 3.8.1 to 3.8.2 (#6261)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-23 21:34:14 -07:00
dependabot[bot] 4792d020f8
Bump github/codeql-action from 3.28.15 to 3.28.16 (#6260)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-23 18:44:13 -07:00
Piotr Kiełkowicz d5f44d0ae5
[Tests.Stress*] enable analysis (#6253) 2025-04-23 16:15:16 -07:00
Piotr Kiełkowicz fd1b5afd08
[Benchmarks] enable analysis (#6254)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-23 11:32:27 -07:00
Martin Costello 177596891a
Publish NuGet packages as GitHub Artifacts (#6255) 2025-04-22 14:03:09 -07:00
dependabot[bot] 1edcddbe00
Bump codecov/codecov-action from 5.4.0 to 5.4.2 (#6252)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
2025-04-16 09:41:25 -07:00
Piotr Kiełkowicz 31fb3bdf35
[OpenTelemetry.Api.Tests] enable analysis (#6246)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-14 13:46:46 -07:00
Piotr Kiełkowicz ea70cd550d
[Exporter.OpenTelemetry.Protocol] update PersistentStorage (#6249) 2025-04-14 11:38:20 -07:00
dependabot[bot] ab32e39c14
Bump dotnet-sdk from 9.0.202 to 9.0.203 (#6243)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-04-10 12:20:37 -07:00
Yevhenii Solomchenko fbbe939dd4
[Examples.Microservice] migrate to Minimal Hosting Model (#6247) 2025-04-10 11:19:39 -07:00
Piotr Kiełkowicz 7c0eab2f42
[TestApp.AspNetCore] enable analysis (#6240)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-09 15:22:40 -07:00
Piotr Kiełkowicz 98b3986620
[OpenTelemetry.Api] enable analysis (#6206)
Co-authored-by: Alan West <3676547+alanwest@users.noreply.github.com>
2025-04-09 13:43:15 -07:00
dependabot[bot] bb8abee277
Bump github/codeql-action from 3.28.14 to 3.28.15 (#6239)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-09 10:59:13 -07:00
Piotr Kiełkowicz ff009146a9
[Example/WorkerService] enable analysis (#6220)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-09 09:17:08 -07:00
Rajkumar Rangaraj aa73ce3aaf
[otlp] Remove Grpc.Core support for .NET Framework and .NET Standard 2.0 in OTLP exporter (#6229) 2025-04-08 12:09:30 -07:00
Piotr Kiełkowicz f183a6a11e
[Examples.Console] enable analysis (#6221)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-08 11:30:42 -07:00
Yevhenii Solomchenko 72f7348b57
[Examples.GrpcService] migrate to Minimal Hosting Model (#6225)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-08 09:54:20 -07:00
Piotr Kiełkowicz 6e6ce171e8
[repo] OpenSSF Scorecard - pin docker images to exact digest (#6230)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-07 16:49:40 -07:00
dependabot[bot] 04dd5d149c
Bump github/codeql-action from 3.28.12 to 3.28.14 (#6236)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-07 13:25:38 -07:00
Jean Bisutti 06ef55786a
Remove unused import (#6232)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-04 11:37:01 -07:00
Yevhenii Solomchenko 20988528fd
[OpenTelemetry] Improve memory efficiency in Dispose (#6212)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-04-04 10:56:59 -07:00
xiang17 180c9e84db
[Exporter.Console] Update otel-collector version to be compatible with debug exporter (#6223) 2025-04-02 16:03:53 -07:00
OpenTelemetry Bot 528d642b44
Add ossf-scorecard scanning workflow (#6218)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-03-31 19:31:26 -07:00
Piotr Kiełkowicz 72a5f7c36e
[Example/WebApi] enable analysis (#6215) 2025-03-31 10:55:12 -07:00
Piotr Kiełkowicz 868ae707fc
[repo] GitHub Actions hardening (#6214) 2025-03-31 09:05:40 -07:00
Piotr Kiełkowicz 3e8c537192
[Examples/Utils] enable analysis (#6211) 2025-03-28 09:06:24 -07:00
Piotr Kiełkowicz 27116b2210
[AotCompatibility.TestApp] enable analysis (#6210) 2025-03-27 09:06:58 -07:00
Piotr Kiełkowicz a8ede4bdc5
[documentation] fix links to internal example (#6207) 2025-03-26 11:35:21 -07:00
Piotr Kiełkowicz f63f8d93f8
[Extensions.Hosting.Tests] enable analysis (#6204)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-25 20:05:43 -07:00
Piotr Kiełkowicz 242cebabfc
[W3cTraceContext.Tests] enable analysis (#6202)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-25 11:00:12 -07:00
Piotr Kiełkowicz c1472c76fd
[Examples.AspNetCore] enable analysis (#6193)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-25 10:34:21 -07:00
dependabot[bot] 6c69fb2b8c
Bump fossas/fossa-action from 1.5.0 to 1.6.0 (#6201)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-24 20:52:56 -07:00
Jakub Januszkiewicz d01e7f9699
[Exporter.Console] use Environment.NewLine instead of hardcoded LF in console exporters (#6203) 2025-03-24 16:01:24 -07:00
Piotr Kiełkowicz 89e5999e69
[Exporter.Console] enable analysis (#6195)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-21 13:24:42 -07:00
nima nikoonazar 99b686e1ad
[Exporter.OTLP] Optimize GetHeaders by Spans (#6179)
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
Co-authored-by: xiang17 <xili9@microsoft.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-21 11:49:14 -07:00
Ali Mahboubi 647f1b17a1
[Api] support for adding default tags to tracer (#6137)
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
2025-03-21 10:28:34 -07:00
dependabot[bot] 402ed87689
Bump dotnet-sdk from 9.0.201 to 9.0.202 (#6196)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-20 15:23:03 -07:00
Piotr Kiełkowicz 3be15201d7
[repo] Remove unused PackageVersion definitions (#6197) 2025-03-20 15:07:32 -07:00
Piotr Kiełkowicz 807aa26d20
[Exporter.Zipkin] - enable analysis (#6189)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-18 12:17:12 -07:00
Piotr Kiełkowicz aa5b0423ff
[Extensions.Propagators] enable analysis (#6192) 2025-03-18 11:50:53 -07:00
Piotr Kiełkowicz 643e80ef53
[repo] Standardize Tests file names (#6190) 2025-03-17 12:56:56 -07:00
Piotr Kiełkowicz a8f1076e4d
[Exporter.Prometheus] - enable analysis (#6171)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-13 14:43:18 -07:00
Piotr Kiełkowicz 5635e6b8d6
[Exporter.Zipkin] Unskip ErrorGettingUriFromEnvVarSetsDefaultEndpointValue test (#6184)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-13 14:24:47 -07:00
Piotr Kiełkowicz 2862c884e0
[Examples.GrpcService] enable analysis (#6186)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-13 14:09:52 -07:00
dependabot[bot] 13a06da855
Bump dotnet-sdk from 9.0.200 to 9.0.201 (#6182)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-13 13:52:09 -07:00
Martin Costello cc2ffdad5b
[repo] codecov - Fix workflow warning (#6185) 2025-03-13 11:26:40 -07:00
Piotr Kiełkowicz c977f73246
[Shims.OpenTracing] enable code analysis (#6160)
Co-authored-by: Rajkumar Rangaraj <rajrang@microsoft.com>
2025-03-11 14:55:03 -07:00
Piotr Kiełkowicz 8943733bcd
[Exporter.InMemory] - enable analysis (#6165) 2025-03-11 11:00:53 -07:00
Marcin Jahn 796f49bcfd
Update docs in BatchExportProcessorOptions.cs (#6177)
Co-authored-by: Piotr Kiełkowicz <pkiekowicz@splunk.com>
2025-03-07 09:02:11 -08:00
Martin Costello 9b83e7bf09
Update OpenTelemetry.Api CHANGELOG (#6172) 2025-03-05 09:45:42 -08:00
530 changed files with 5888 additions and 3821 deletions

4
.clomonitor.yml Normal file
View File

@ -0,0 +1,4 @@
# see https://github.com/cncf/clomonitor/blob/main/docs/checks.md#exemptions
exemptions:
- check: artifacthub_badge
reason: "Artifact Hub doesn't support .NET packages"

View File

@ -10,6 +10,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.sh]
end_of_line = lf
[*.{cs,cshtml,htm,html,md,py,sln,xml}]
indent_size = 4
@ -160,6 +163,9 @@ dotnet_diagnostic.RS0041.severity = suggestion
# CA1515: Disable making types internal for Tests classes. It is required by xunit
dotnet_diagnostic.CA1515.severity = none
# CA2007: Disable Consider calling ConfigureAwait on the awaited task. It is not working with xunit
dotnet_diagnostic.CA2007.severity = none
[**/obj/**.cs]
generated_code = true

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
*.sh eol=lf

View File

@ -62,7 +62,7 @@ body:
- type: textarea
attributes:
label: Steps to Reproduce
description: Provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). We will close the issue if the repro project you share with us is complex or we cannot reproduce the behavior you are reporting. We cannot investigate custom projects, so don't point us to such, please.
description: Provide a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). We will close the issue if the repro project you share with us is complex or we cannot reproduce the behavior you are reporting. We cannot investigate custom projects, so don't point us to such, please.
validations:
required: true
@ -84,3 +84,11 @@ body:
attributes:
label: Additional Context
description: Any additional information you think may be relevant to this issue.
- type: dropdown
attributes:
label: Tip
description: This element is static, used to render a helpful sub-heading for end-users and community members to help prioritize issues. Please leave as is.
options:
- "<sub>[React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with :+1: to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).</sub>"
default: 0

View File

@ -53,3 +53,11 @@ body:
attributes:
label: Additional context
description: Any additional information you think may be relevant to this feature request.
- type: dropdown
attributes:
label: Tip
description: This element is static, used to render a helpful sub-heading for end-users and community members to help prioritize issues. Please leave as is.
options:
- "<sub>[React](https://github.blog/news-insights/product-news/add-reactions-to-pull-requests-issues-and-comments/) with :+1: to help prioritize this issue. Please use comments to provide useful context, avoiding `+1` or `me too`, to help us triage it. Learn more [here](https://opentelemetry.io/community/end-user/issue-participation/).</sub>"
default: 0

View File

@ -6,6 +6,54 @@ updates:
interval: "daily"
labels:
- "infra"
- package-ecosystem: "docker"
directory: "/examples/MicroserviceExample/WebApi"
schedule:
interval: "weekly"
day: "wednesday"
labels:
- "infra"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
- package-ecosystem: "docker"
directory: "examples/MicroserviceExample/WorkerService"
schedule:
interval: "weekly"
day: "wednesday"
labels:
- "infra"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
- package-ecosystem: "docker"
directory: "test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest"
schedule:
interval: "weekly"
day: "wednesday"
labels:
- "infra"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
- package-ecosystem: "docker"
directory: "test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests"
schedule:
interval: "weekly"
day: "wednesday"
labels:
- "infra"
ignore:
- dependency-name: "*"
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
- package-ecosystem: "dotnet-sdk"
directory: "/"
schedule:
@ -18,3 +66,10 @@ updates:
update-types:
- "version-update:semver-major"
- "version-update:semver-minor"
- package-ecosystem: "pip"
directory: "test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests"
schedule:
interval: "weekly"
day: "wednesday"
labels:
- "infra"

View File

@ -28,6 +28,9 @@ on:
required: false
type: string
permissions:
contents: read
jobs:
build-test:
@ -46,15 +49,21 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
# the version tag which is typically NOT on the first commit so we
# retrieve them all.
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
- name: Setup previous .NET runtimes
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
with:
dotnet-version: |
8.0.x
- name: Setup .NET
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: dotnet restore ${{ inputs.project-name }}
run: dotnet restore ${{ inputs.project-name }} ${{ inputs.project-build-commands }}
@ -63,7 +72,18 @@ jobs:
run: dotnet build ${{ inputs.project-name }} --configuration Release --no-restore ${{ inputs.project-build-commands }}
- name: dotnet test ${{ inputs.project-name }}
run: dotnet test ${{ inputs.project-name }} --collect:"Code Coverage" --results-directory:TestResults --framework ${{ matrix.version }} --configuration Release --no-restore --no-build --logger:"console;verbosity=detailed" -- RunConfiguration.DisableAppDomain=true
run: >
dotnet test ${{ inputs.project-name }}
--collect:"Code Coverage"
--results-directory:TestResults
--framework ${{ matrix.version }}
--configuration Release
--no-restore
--no-build
--logger:"console;verbosity=detailed"
--logger:"GitHubActions;report-warnings=false"
--logger:"junit;LogFilePath=TestResults/junit.xml"
-- RunConfiguration.DisableAppDomain=true
- name: Install coverage tool
run: dotnet tool install -g dotnet-coverage
@ -72,15 +92,24 @@ jobs:
run: dotnet-coverage merge -f cobertura -o ./TestResults/Cobertura.xml ./TestResults/**/*.coverage
- name: Upload code coverage ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
continue-on-error: true # Note: Don't fail for upload failures
env:
OS: ${{ matrix.os }}
TFM: ${{ matrix.version }}
token: ${{ secrets.CODECOV_TOKEN }}
with:
file: TestResults/Cobertura.xml
files: TestResults/Cobertura.xml
env_vars: OS,TFM
flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
name: Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
codecov_yml_path: .github/codecov.yml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
if: ${{ !cancelled() && hashFiles('./**/TestResults/junit.xml') != '' }}
uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1
with:
env_vars: OS,TFM
flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
name: Test results for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
token: ${{ secrets.CODECOV_TOKEN }}

View File

@ -7,18 +7,19 @@ on:
branches: [ 'main*' ]
permissions:
issues: write
pull-requests: write
contents: read
jobs:
add-labels-on-issues:
permissions:
issues: write
if: github.event_name == 'issues' && !github.event.issue.pull_request
runs-on: ubuntu-22.04
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Add labels for package found in bug issue descriptions
shell: pwsh
@ -33,13 +34,15 @@ jobs:
ISSUE_BODY: ${{ github.event.issue.body }}
add-labels-on-pull-requests:
permissions:
pull-requests: write
if: github.event_name == 'pull_request_target'
runs-on: ubuntu-22.04
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: ${{ github.event.repository.default_branch }} # Note: Do not run on the PR branch we want to execute add-labels.psm1 from main on the base repo only because pull_request_target can see secrets

View File

@ -15,6 +15,9 @@ on:
OPENTELEMETRYBOT_GITHUB_TOKEN:
required: false
permissions:
contents: read
jobs:
resolve-automation:

View File

@ -9,6 +9,9 @@ on:
pull_request:
branches: [ 'main*' ]
permissions:
contents: read
jobs:
lint-misspell-sanitycheck:
uses: ./.github/workflows/sanitycheck.yml
@ -18,8 +21,8 @@ jobs:
outputs:
changes: ${{ steps.changes.outputs.changes }}
steps:
- uses: actions/checkout@v4
- uses: AurorNZ/paths-filter@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: AurorNZ/paths-filter@3b1f3abc3371cca888d8eb03dfa70bc8a9867629 # v4.0.0
id: changes
with:
filters: |
@ -113,7 +116,7 @@ jobs:
matrix:
version: [ net8.0, net9.0 ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Run OTLP Exporter docker compose
run: docker compose --file=test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/IntegrationTest/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build
@ -131,7 +134,7 @@ jobs:
matrix:
version: [ net8.0, net9.0 ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Run W3C Trace Context docker compose
run: docker compose --file=test/OpenTelemetry.Instrumentation.W3cTraceContext.Tests/docker-compose.yml --file=build/docker-compose.${{ matrix.version }}.yml --project-directory=. up --exit-code-from=tests --build

View File

@ -1,46 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
schedule:
- cron: '0 0 * * *' # once in a day at 00:00
workflow_dispatch:
permissions: {}
jobs:
analyze:
name: Analyze
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/analyze to upload SARIF results
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
language: ['csharp']
language: ['actions', 'csharp']
steps:
- name: configure Pagefile
uses: al-cheb/configure-pagefile-action@v1.4
- name: Configure Pagefile
if: matrix.language == 'csharp'
uses: al-cheb/configure-pagefile-action@a3b6ebd6b634da88790d9c58d4b37a7f4a7b8708 # v1.4
with:
minimum-size: 8GB
maximum-size: 32GB
disk-root: "D:"
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
filter: 'tree:0'
persist-credentials: false
show-progress: false
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
with:
build-mode: none
languages: ${{ matrix.language }}
- name: Setup dotnet
uses: actions/setup-dotnet@v4
- name: dotnet pack
run: dotnet pack ./build/OpenTelemetry.proj --configuration Release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
with:
category: '/language:${{ matrix.language }}'
codeql:
if: ${{ !cancelled() }}
needs: [ analyze ]
runs-on: ubuntu-latest
steps:
- name: Report status
shell: bash
env:
SCAN_SUCCESS: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
run: |
if [ "${SCAN_SUCCESS}" == "true" ]
then
echo 'CodeQL analysis successful'
else
echo 'CodeQL analysis failed'
exit 1
fi

View File

@ -5,6 +5,9 @@ name: Concurrency Tests
on:
workflow_call:
permissions:
contents: read
jobs:
run-concurrency-tests:
@ -17,10 +20,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: Run Coyote Tests
shell: pwsh
@ -28,7 +31,7 @@ jobs:
- name: Publish Artifacts
if: always() && !cancelled()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ matrix.os }}-${{ matrix.project }}-${{ matrix.version }}-coyoteoutput
path: '**/*_CoyoteOutput.*'

View File

@ -5,16 +5,19 @@ name: Build docfx
on:
workflow_call:
permissions:
contents: read
jobs:
run-docfx-build:
runs-on: windows-latest
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: install docfx
run: dotnet tool install -g docfx

View File

@ -5,16 +5,19 @@ name: Lint - dotnet format
on:
workflow_call:
permissions:
contents: read
jobs:
run-dotnet-format-stable:
runs-on: windows-latest
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: dotnet restore
run: dotnet restore OpenTelemetry.sln
@ -29,10 +32,10 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: dotnet restore
run: dotnet restore OpenTelemetry.sln

View File

@ -12,9 +12,9 @@ jobs:
fossa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: fossas/fossa-action@93a52ecf7c3ac7eb40f5de77fd69b1a19524de94 # v1.5.0
- uses: fossas/fossa-action@3ebcea1862c6ffbd5cf1b4d0bd6b3fe7bd6f2cac # v1.7.0
with:
api-key: ${{secrets.FOSSA_API_KEY}}
team: OpenTelemetry

View File

@ -5,16 +5,19 @@ name: Lint - Markdown
on:
workflow_call:
permissions:
contents: read
jobs:
run-markdownlint:
runs-on: ubuntu-22.04
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: run markdownlint
uses: DavidAnson/markdownlint-cli2-action@v19.1.0
uses: DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e # v20.0.0
with:
globs: |
**/*.md

47
.github/workflows/ossf-scorecard.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: OSSF Scorecard
on:
push:
branches:
- main
schedule:
- cron: "24 5 * * 0" # once a week
workflow_dispatch:
permissions: read-all
jobs:
analysis:
runs-on: ubuntu-latest
permissions:
# Needed for Code scanning upload
security-events: write
# Needed for GitHub OIDC token if publish_results is true
id-token: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
with:
results_file: results.sarif
results_format: sarif
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable
# uploads of run results in SARIF format to the repository Actions tab.
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
- name: "Upload artifact"
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@2d92b76c45b91eb80fc44c74ce3fce0ee94e8f9d # v3.30.0
with:
sarif_file: results.sarif

View File

@ -5,12 +5,15 @@ name: Package Validation
on:
workflow_call:
permissions:
contents: read
jobs:
run-package-validation-stable:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
# the version tag which is typically NOT on the first commit so we
@ -18,16 +21,23 @@ jobs:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: dotnet pack
run: dotnet pack ./build/OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=false /p:RunningDotNetPack=true
- name: Publish stable NuGet packages to Artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-stable
path: ./artifacts/package/release
if-no-files-found: error
run-package-validation-experimental:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
# the version tag which is typically NOT on the first commit so we
@ -35,7 +45,14 @@ jobs:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: dotnet pack
run: dotnet pack ./build/OpenTelemetry.proj --configuration Release /p:EnablePackageValidation=true /p:ExposeExperimentalFeatures=true /p:RunningDotNetPack=true
- name: Publish experimental NuGet packages to Artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: packages-experimental
path: ./artifacts/package/release
if-no-files-found: error

View File

@ -16,6 +16,9 @@ on:
types:
- created
permissions:
contents: read
jobs:
automation:
uses: ./.github/workflows/automation.yml
@ -41,7 +44,7 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
ref: ${{ github.event.repository.default_branch }}
@ -75,7 +78,7 @@ jobs:
GH_TOKEN: ${{ secrets[needs.automation.outputs.token-secret-name] }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# Note: By default GitHub only fetches 1 commit. We need all the tags
# for this work.
@ -84,7 +87,7 @@ jobs:
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
- name: Setup dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: Create GitHub Pull Request to update stable build version in props
if: |

View File

@ -23,6 +23,9 @@ on:
types:
- created
permissions:
contents: read
jobs:
automation:
uses: ./.github/workflows/automation.yml
@ -40,7 +43,7 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
@ -76,7 +79,7 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
@ -110,7 +113,7 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
fetch-depth: 0
@ -149,7 +152,7 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
fetch-depth: 0
@ -188,13 +191,15 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# Note: By default GitHub only fetches 1 commit which fails the git tag operation below
fetch-depth: 0
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}
- name: Update release notes
env:
COMMENT_BODY: ${{ github.event.comment.body }}
shell: pwsh
run: |
Import-Module .\build\scripts\prepare-release.psm1
@ -204,6 +209,6 @@ jobs:
-pullRequestNumber '${{ github.event.issue.number }}' `
-botUserName '${{ needs.automation.outputs.username }}' `
-commentUserName '${{ github.event.comment.user.login }}' `
-commentBody '${{ github.event.comment.body }}' `
-commentBody $Env:COMMENT_BODY `
-gitUserName '${{ needs.automation.outputs.username }}' `
-gitUserEmail '${{ needs.automation.outputs.email }}'

View File

@ -16,6 +16,9 @@ on:
schedule:
- cron: '0 0 * * *' # once in a day at 00:00
permissions:
contents: read
jobs:
automation:
uses: ./.github/workflows/automation.yml
@ -35,7 +38,7 @@ jobs:
artifact-id: ${{ steps.upload-artifacts.outputs.artifact-id }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
# Note: By default GitHub only fetches 1 commit. MinVer needs to find
# the version tag which is typically NOT on the first commit so we
@ -43,12 +46,12 @@ jobs:
fetch-depth: 0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: Install Cosign
uses: sigstore/cosign-installer@v3
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # v3.9.2
with:
cosign-release: v2.4.0
cosign-release: v2.5.3
- name: dotnet restore
run: dotnet restore ./build/OpenTelemetry.proj -p:RunningDotNetPack=true
@ -64,7 +67,7 @@ jobs:
foreach ($projectFile in $projectFiles) {
$projectName = [System.IO.Path]::GetFileNameWithoutExtension($projectFile)
Get-ChildItem -Path src/$projectName/bin/Release/*/$projectName.dll -File | ForEach-Object {
Get-ChildItem -Path artifacts/bin/$projectName/release_*/$projectName.dll -File | ForEach-Object {
$fileFullPath = $_.FullName
Write-Host "Signing $fileFullPath"
@ -77,10 +80,11 @@ jobs:
- name: Publish Artifacts
id: upload-artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ github.ref_name }}-packages
path: 'src/**/*.*nupkg'
path: ./artifacts/package/release
if-no-files-found: error
- name: Publish MyGet
env:
@ -88,7 +92,7 @@ jobs:
if: env.MYGET_TOKEN_EXISTS == 'true' # Skip MyGet publish if run on a fork without the secret
run: |
nuget setApiKey ${{ secrets.MYGET_TOKEN }} -Source https://www.myget.org/F/opentelemetry/api/v2/package
nuget push src/**/*.nupkg -Source https://www.myget.org/F/opentelemetry/api/v2/package
nuget push ./artifacts/package/release/*.nupkg -Source https://www.myget.org/F/opentelemetry/api/v2/package
post-build:
runs-on: ubuntu-22.04
@ -104,7 +108,7 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
token: ${{ secrets[needs.automation.outputs.token-secret-name] }}

View File

@ -5,13 +5,16 @@ name: Lint - Spelling & Encoding
on:
workflow_call:
permissions:
contents: read
jobs:
run-misspell:
runs-on: ubuntu-22.04
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: install misspell
run: |
@ -26,7 +29,7 @@ jobs:
steps:
- name: check out code
uses: actions/checkout@v4
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: detect non-ASCII encoding and trailing space
run: python3 ./build/scripts/sanitycheck.py

View File

@ -6,11 +6,17 @@ on:
schedule:
- cron: "12 3 * * *" # arbitrary time not to DDOS GitHub
permissions:
contents: read
jobs:
stale:
permissions:
issues: write # for actions/stale to close stale issues
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-22.04
steps:
- uses: actions/stale@v9
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
stale-issue-message: 'This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.'
close-issue-message: 'Closed as inactive. Feel free to reopen if this issue is still a concern.'
@ -22,4 +28,5 @@ jobs:
days-before-pr-close: 7
days-before-issue-close: 7
exempt-all-issue-milestones: true
exempt-issue-labels: needs-triage
exempt-issue-labels: 'keep-open,needs-triage'
exempt-pr-labels: 'keep-open'

View File

@ -5,6 +5,9 @@ name: Publish & Verify AOT Compatibility
on:
workflow_call:
permissions:
contents: read
jobs:
run-verify-aot-compat:
@ -16,10 +19,10 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Setup dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1
- name: publish AOT testApp, assert static analysis warning count, and run the app
shell: pwsh

4
.gitignore vendored
View File

@ -21,6 +21,7 @@
x64/
x86/
bld/
[Aa]rtifacts/
[Bb]in/
[Oo]bj/
[Ll]og/
@ -351,3 +352,6 @@ tempo-data/
# Coyote Rewrite Files
rewrite.coyote.json
# Test results
TestResults/

View File

@ -10,3 +10,6 @@ MD013:
MD033:
# Allowed elements
allowed_elements: [ 'details', 'summary' ]
# MD059/link-text-should-be-descriptive : Inline HTML : https://github.com/DavidAnson/markdownlint/blob/v0.38.0/doc/md059.md
MD059: false

View File

@ -14,10 +14,33 @@ Anyone may contribute but there are benefits of being a member of our community.
See the [community membership
document](https://github.com/open-telemetry/community/blob/main/community-membership.md)
on how to become a
[**Member**](https://github.com/open-telemetry/community/blob/main/community-membership.md#member),
[**Approver**](https://github.com/open-telemetry/community/blob/main/community-membership.md#approver)
[**Member**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#member),
[**Triager**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager),
[**Approver**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver),
and
[**Maintainer**](https://github.com/open-telemetry/community/blob/main/community-membership.md#maintainer).
[**Maintainer**](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
## Give feedback
We are always looking for your feedback.
You can do this by [submitting a GitHub issue](https://github.com/open-telemetry/opentelemetry-dotnet/issues/new).
You may also prefer writing on [#otel-dotnet Slack channel](https://cloud-native.slack.com/archives/C01N3BC2W7Q).
### Report a bug
Reporting bugs is an important contribution. Please make sure to include:
* Expected and actual behavior;
* OpenTelemetry, OS, and .NET versions you are using;
* Steps to reproduce;
* [Minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example).
### Request a feature
If you would like to work on something that is not listed as an issue
(e.g. a new feature or enhancement) please create an issue and describe your proposal.
## Find a buddy and get started quickly
@ -300,9 +323,6 @@ types](https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-type
* Pass [static
analysis](https://learn.microsoft.com/dotnet/fundamentals/code-analysis/overview).
New projects MUST enable static analysis by specifying
`<AnalysisLevel>latest-all</AnalysisLevel>` in the project file (`.csproj`).
> [!NOTE]
> There are other project-level features enabled automatically via
[Common.props](https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/build/Common.props)

6
Directory.Build.props Normal file
View File

@ -0,0 +1,6 @@
<Project>
<PropertyGroup>
<ArtifactsPath>$([System.IO.Path]::Combine('$(MSBuildThisFileDirectory)', 'artifacts'))</ArtifactsPath>
<UseArtifactsOutput>true</UseArtifactsOutput>
</PropertyGroup>
</Project>

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<OTelLatestStableVer>1.11.2</OTelLatestStableVer>
<OTelLatestStableVer>1.12.0</OTelLatestStableVer>
<!--
This is typically the latest annual release of .NET. Use this wherever
@ -31,13 +31,10 @@
3) Since version 3.1.0, the .NET runtime team is holding a high bar for backward compatibility on
these packages even during major version bumps, so compatibility is not a concern here.
-->
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="$(LatestRuntimeOutOfBandVer)" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="$(LatestRuntimeOutOfBandVer)" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.Abstractions" Version="$(LatestRuntimeOutOfBandVer)" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(LatestRuntimeOutOfBandVer)" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(LatestRuntimeOutOfBandVer)" />
<PackageVersion Include="Microsoft.Extensions.Logging.Configuration" Version="$(LatestRuntimeOutOfBandVer)" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="$(LatestRuntimeOutOfBandVer)" />
<!--
OTel packages always point to latest stable release.
@ -60,15 +57,6 @@
even during major version bumps, so compatibility is not a concern here.
-->
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="$(LatestRuntimeOutOfBandVer)" />
<!--
We use conservative versions of these packages where an upgrade might
introduce breaking changes.
-->
<PackageVersion Include="Google.Protobuf" Version="[3.22.5,4.0)" />
<PackageVersion Include="Grpc" Version="[2.44.0,3.0)" />
<PackageVersion Include="Grpc.Core" Version="[2.44.0,3.0)" />
<PackageVersion Include="Grpc.Net.Client" Version="[2.52.0,3.0)" />
</ItemGroup>
<ItemGroup>
@ -95,11 +83,16 @@
These packages are referenced as "PrivateAssets" or used in tests/examples.
-->
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="[0.13.12,0.14)" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.2" />
<PackageVersion Include="CommandLineParser" Version="[2.9.1,3.0)" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
<PackageVersion Include="Grpc.AspNetCore" Version="[2.59.0,3.0)" />
<PackageVersion Include="Grpc.AspNetCore.Server" Version="[2.59.0, 3.0)" />
<PackageVersion Include="Grpc.Tools" Version="[2.59.0,3.0)" />
<PackageVersion Include="Google.Protobuf" Version="[3.22.5,4.0)" />
<PackageVersion Include="Grpc" Version="[2.44.0,3.0)" />
<PackageVersion Include="Grpc.Net.Client" Version="[2.52.0,3.0)" />
<PackageVersion Include="JunitXml.TestLogger" Version="6.1.0" />
<PackageVersion Include="Microsoft.CSharp" Version="[4.7.0]" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="[3.11.0-beta1.23525.2]" />
<PackageVersion Include="Microsoft.Coyote" Version="1.7.11" />
@ -110,7 +103,6 @@
<PackageVersion Include="Microsoft.Extensions.Telemetry.Abstractions" Version="[9.0.0,)" />
<PackageVersion Include="Microsoft.NETFramework.ReferenceAssemblies" Version="[1.0.3,2.0)" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="[17.13.0,18.0.0)" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="[8.0.0,9.0)" />
<PackageVersion Include="MinVer" Version="[5.0.0,6.0)" />
<PackageVersion Include="NuGet.Versioning" Version="6.11.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="[1.9.0,2.0)" />

View File

@ -3,19 +3,14 @@
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet8" value="https://dnceng.pkgs.visualstudio.com/public/_packaging/dotnet8/nuget/v3/index.json" />
</packageSources>
<!-- Define mappings by adding package patterns beneath the target source. -->
<!-- *.Tools packages will be restored from ".Net Core Tools", everything else from nuget.org. -->
<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="NuGet">
<package pattern="*" />
</packageSource>
<packageSource key="dotnet8">
<package pattern="Microsoft.CodeAnalysis.PublicApiAnalyzers" />
</packageSource>
</packageSourceMapping>
<disabledPackageSources />

View File

@ -254,7 +254,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{A49299
src\Shared\ExceptionExtensions.cs = src\Shared\ExceptionExtensions.cs
src\Shared\Guard.cs = src\Shared\Guard.cs
src\Shared\MathHelper.cs = src\Shared\MathHelper.cs
src\Shared\PeerServiceResolver.cs = src\Shared\PeerServiceResolver.cs
src\Shared\PeriodicExportingMetricReaderHelper.cs = src\Shared\PeriodicExportingMetricReaderHelper.cs
src\Shared\PooledList.cs = src\Shared\PooledList.cs
src\Shared\ResourceSemanticConventions.cs = src\Shared\ResourceSemanticConventions.cs

View File

@ -6,6 +6,11 @@
[![NuGet](https://img.shields.io/nuget/dt/OpenTelemetry.svg)](https://www.nuget.org/profiles/OpenTelemetry)
[![Build](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/open-telemetry/opentelemetry-dotnet/actions/workflows/ci.yml)
[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/open-telemetry/opentelemetry-dotnet/badge)](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-dotnet)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/10017/badge)](https://www.bestpractices.dev/projects/10017)
[![FOSSA License Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet?ref=badge_shield&issueType=license)
[![FOSSA Security Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet.svg?type=shield&issueType=security)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-dotnet?ref=badge_shield&issueType=security)
The .NET [OpenTelemetry](https://opentelemetry.io/) implementation.
<details>
@ -231,26 +236,38 @@ regardless of your experience level. Whether you're a seasoned OpenTelemetry
developer, just starting your journey, or simply curious about the work we do,
you're more than welcome to participate!
[Maintainers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer)
([@open-telemetry/dotnet-maintainers](https://github.com/orgs/open-telemetry/teams/dotnet-maintainers)):
### Maintainers
* [Alan West](https://github.com/alanwest), New Relic
* [Rajkumar Rangaraj](https://github.com/rajkumar-rangaraj), Microsoft
[Emeritus Maintainers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager):
For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer).
### Approvers
* [Cijo Thomas](https://github.com/cijothomas), Microsoft
* [Martin Costello](https://github.com/martincostello), Grafana Labs
* [Mikel Blanchard](https://github.com/CodeBlanch), Microsoft
* [Piotr Kie&#x142;kowicz](https://github.com/Kielek), Splunk
For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver).
### Triagers
* [Martin Thwaites](https://github.com/martinjt), Honeycomb
* [Timothy "Mothra" Lee](https://github.com/TimothyMothra)
For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager).
### Emeritus Maintainers
* [Mike Goldsmith](https://github.com/MikeGoldsmith)
* [Sergey Kanzhelev](https://github.com/SergeyKanzhelev)
* [Utkarsh Umesan Pillai](https://github.com/utpilla)
[Approvers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver)
([@open-telemetry/dotnet-approvers](https://github.com/orgs/open-telemetry/teams/dotnet-approvers)):
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
* [Cijo Thomas](https://github.com/cijothomas), Microsoft
* [Mikel Blanchard](https://github.com/CodeBlanch), Microsoft
* [Piotr Kie&#x142;kowicz](https://github.com/Kielek), Splunk
[Emeritus Approvers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager):
### Emeritus Approvers
* [Bruno Garcia](https://github.com/bruno-garcia)
* [Eddy Nakamura](https://github.com/eddynaka)
@ -260,16 +277,14 @@ you're more than welcome to participate!
* [Robert Paj&#x105;k](https://github.com/pellared)
* [Vishwesh Bankwar](https://github.com/vishweshbankwar)
[Triagers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager)
([@open-telemetry/dotnet-triagers](https://github.com/orgs/open-telemetry/teams/dotnet-triagers)):
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
* [Martin Thwaites](https://github.com/martinjt), Honeycomb
* [Timothy "Mothra" Lee](https://github.com/TimothyMothra), Microsoft
[Emeritus Triagers](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager):
### Emeritus Triagers
* [Victor Lu](https://github.com/victlu)
For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager).
### Thanks to all the people who have contributed
[![contributors](https://contributors-img.web.app/image?repo=open-telemetry/opentelemetry-dotnet)](https://github.com/open-telemetry/opentelemetry-dotnet/graphs/contributors)

View File

@ -4,6 +4,18 @@ This file contains highlights and announcements covering all components.
For more details see `CHANGELOG.md` files maintained in the root source
directory of each individual package.
## 1.12.0
Release details: [1.12.0](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.12.0)
* **Breaking Change**: `OpenTelemetry.Exporter.OpenTelemetryProtocol` now
defaults to using OTLP/HTTP instead of OTLP/gRPC when targeting .NET Framework
and .NET Standard. This change may cause telemetry export to fail unless
appropriate adjustments are made. Explicitly setting OTLP/gRPC may result in a
`NotSupportedException` unless further configuration is applied. See
[#6209](https://github.com/open-telemetry/opentelemetry-dotnet/issues/6209) for
full details and mitigation guidance. [#6229](https://github.com/open-telemetry/opentelemetry-dotnet/pull/6229)
## 1.11.1
Release details: [1.11.1](https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.11.1)

View File

@ -2,7 +2,7 @@
<Import Project=".\Common.props" />
<PropertyGroup>
<NoWarn>$(NoWarn),1574,1591</NoWarn>
<NoWarn>$(NoWarn),CS1574,CS1591</NoWarn>
<IsPackable>false</IsPackable>
<CodeAnalysisRuleSet>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\OpenTelemetry.test.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
@ -21,6 +21,18 @@
</Content>
</ItemGroup>
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<PackageReference Include="GitHubActionsTestLogger" />
<PackageReference Include="JunitXml.TestLogger" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
</ItemGroup>
<ItemGroup Condition="'$(IsTestProject)' == 'true'">
<Compile Include="$(RepoRoot)\test\Shared\StrongNameTests.cs" Link="StrongNameTests.cs" />
</ItemGroup>
<PropertyGroup>
<!-- Running unit tests from VSCode does not work with .NET SDK 6.0.200 without ProduceReferenceAssemblyInOutDir -->
<!-- Related breaking change: https://docs.microsoft.com/en-us/dotnet/core/compatibility/sdk/6.0/write-reference-assemblies-to-obj -->

View File

@ -18,7 +18,6 @@
<PackageProjectUrl>https://opentelemetry.io</PackageProjectUrl>
<Authors>OpenTelemetry Authors</Authors>
<Copyright>Copyright The OpenTelemetry Authors</Copyright>
<PackageOutputPath Condition="$(Build_ArtifactStagingDirectory) != ''">$(Build_ArtifactStagingDirectory)</PackageOutputPath>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
@ -36,16 +35,8 @@
<ContinuousIntegrationBuild Condition="'$(Deterministic)'=='true'">true</ContinuousIntegrationBuild>
</PropertyGroup>
<ItemGroup>
<!-- Note: Disable net6.0 target for package validation because it has been
removed. It should be possible to remove this once a stable version has been
released to NuGet without net6.0. -->
<PackageValidationBaselineFrameworkToIgnore Include="net6.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MinVer" PrivateAssets="All" Condition="'$(IntegrationBuild)' != 'true'" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Condition="'$(IntegrationBuild)' != 'true'" />
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="All" />
</ItemGroup>

View File

@ -4,7 +4,6 @@
<SignAssembly>true</SignAssembly>
<RepoRoot>$([System.IO.Directory]::GetParent($(MSBuildThisFileDirectory)).Parent.FullName)</RepoRoot>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)debug.snk</AssemblyOriginatorKeyFile>
<DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Nullable>enable</Nullable>
@ -14,8 +13,11 @@
<NuGetAuditLevel>low</NuGetAuditLevel>
<!-- Suppress warnings for repo code using experimental features -->
<NoWarn>$(NoWarn);OTEL1000;OTEL1001;OTEL1002;OTEL1004</NoWarn>
<!--temporarily disable. See 3958-->
<!--<AnalysisLevel>latest-All</AnalysisLevel>-->
<AnalysisLevel>latest-All</AnalysisLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(SignAssembly)' == 'true' ">
<StrongNamePublicKey>002400000480000094000000060200000024000052534131000400000100010051C1562A090FB0C9F391012A32198B5E5D9A60E9B80FA2D7B434C9E5CCB7259BD606E66F9660676AFC6692B8CDC6793D190904551D2103B7B22FA636DCBB8208839785BA402EA08FC00C8F1500CCEF28BBF599AA64FFB1E1D5DC1BF3420A3777BADFE697856E9D52070A50C3EA5821C80BEF17CA3ACFFA28F89DD413F096F898</StrongNamePublicKey>
</PropertyGroup>
<PropertyGroup Label="BuildFlags">

View File

@ -1,5 +1,3 @@
version: '3.7'
services:
tests:
build:

View File

@ -1,5 +1,3 @@
version: '3.7'
services:
tests:
build:

View File

@ -24,10 +24,9 @@ if ($LastExitCode -ne 0)
Write-Host $publishOutput
}
$runtime = $IsWindows ? "win-x64" : ($IsMacOS ? "macos-x64" : "linux-x64")
$app = $IsWindows ? "./OpenTelemetry.AotCompatibility.TestApp.exe" : "./OpenTelemetry.AotCompatibility.TestApp"
Push-Location $rootDirectory/test/OpenTelemetry.AotCompatibility.TestApp/bin/Release/$targetNetFramework/$runtime
Push-Location $rootDirectory/artifacts/publish/OpenTelemetry.AotCompatibility.TestApp/release_$targetNetFramework
Write-Host "Executing test App..."
$app

View File

@ -1,22 +1,32 @@
param(
[Parameter()][string]$coyoteVersion="1.7.10",
[Parameter()][string]$coyoteVersion="1.7.11",
[Parameter(Mandatory=$true)][string]$testProjectName,
[Parameter(Mandatory=$true)][string]$targetFramework,
[Parameter()][string]$categoryName="CoyoteConcurrencyTests",
[Parameter()][string]$configuration="Release"
)
$ErrorActionPreference = "Stop"
$env:OTEL_RUN_COYOTE_TESTS = 'true'
$rootDirectory = Get-Location
Write-Host "Install Coyote CLI."
dotnet tool install --global Microsoft.Coyote.CLI
dotnet tool install --global Microsoft.Coyote.CLI --version $coyoteVersion
if ($LASTEXITCODE -ne 0) {
throw "Microsoft.Coyote.CLI installation failed with exit code $LASTEXITCODE"
}
Write-Host "Build $testProjectName project."
dotnet build "$rootDirectory/test/$testProjectName/$testProjectName.csproj" --configuration $configuration
$artifactsPath = Join-Path $rootDirectory "test/$testProjectName/bin/$configuration/$targetFramework"
if ($LASTEXITCODE -ne 0) {
throw "dotnet build failed with exit code $LASTEXITCODE"
}
$artifactsPath = Join-Path $rootDirectory "artifacts/bin/$testProjectName/$($configuration.ToLowerInvariant())_$targetFramework"
Write-Host "Generate Coyote rewriting options JSON file."
$assemblies = Get-ChildItem $artifactsPath -Filter OpenTelemetry*.dll | ForEach-Object {$_.Name}
@ -29,6 +39,13 @@ $RewriteOptionsJson | ConvertTo-Json -Compress | Set-Content -Path "$rootDirecto
Write-Host "Run Coyote rewrite."
coyote rewrite "$rootDirectory/test/$testProjectName/rewrite.coyote.json"
if ($LASTEXITCODE -ne 0) {
throw "coyote rewrite failed with exit code $LASTEXITCODE"
}
Write-Host "Execute re-written binary."
dotnet test "$artifactsPath/$testProjectName.dll" --framework $targetFramework --filter CategoryName=$categoryName
if ($LASTEXITCODE -ne 0) {
throw "dotnet test failed with exit code $LASTEXITCODE"
}

View File

@ -1,8 +1,11 @@
<Project>
<Import Project="$([System.IO.Path]::Combine($(MSBuildThisFileDirectory), '..', 'Directory.Build.props'))" />
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'OpenTelemetry.sln'))\build\Common.nonprod.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>$(TargetFrameworksForDocs)</TargetFrameworks>
<!-- Opt-out of Artifacts Output for docs as there are duplicated project names -->
<UseArtifactsOutput>false</UseArtifactsOutput>
</PropertyGroup>
</Project>

View File

@ -1,7 +1,9 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
public struct FoodRecallNotice
namespace ComplexObjects;
internal struct FoodRecallNotice
{
public string? BrandName { get; set; }

View File

@ -1,6 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
using ComplexObjects;
using Microsoft.Extensions.Logging;
using OpenTelemetry.Logs;

View File

@ -7,7 +7,9 @@ using OpenTelemetry;
using OpenTelemetry.Logs;
using OpenTelemetry.Trace;
public class Program
namespace Correlation;
internal sealed class Program
{
private static readonly ActivitySource MyActivitySource = new("MyCompany.MyProduct.MyLibrary");

View File

@ -6,7 +6,7 @@ using OpenTelemetry.Logs;
namespace DedicatedLogging;
public static class DedicatedLoggingServiceCollectionExtensions
internal static class DedicatedLoggingServiceCollectionExtensions
{
public static IServiceCollection AddDedicatedLogging(
this IServiceCollection services,

View File

@ -3,10 +3,10 @@
namespace DedicatedLogging;
public interface IDedicatedLogger : ILogger
internal interface IDedicatedLogger : ILogger
{
}
public interface IDedicatedLogger<out TCategoryName> : IDedicatedLogger
internal interface IDedicatedLogger<out TCategoryName> : IDedicatedLogger
{
}

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<NoWarn>$(NoWarn);CA1812;CA2213</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Extensions.Hosting\OpenTelemetry.Extensions.Hosting.csproj" />

View File

@ -5,7 +5,7 @@ using System.Text;
using OpenTelemetry;
using OpenTelemetry.Logs;
internal class MyExporter : BaseExporter<LogRecord>
internal sealed class MyExporter : BaseExporter<LogRecord>
{
private readonly string name;
@ -59,6 +59,7 @@ internal class MyExporter : BaseExporter<LogRecord>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
Console.WriteLine($"{this.name}.Dispose({disposing})");
}
}

View File

@ -4,7 +4,7 @@
using OpenTelemetry;
using OpenTelemetry.Logs;
internal class MyProcessor : BaseProcessor<LogRecord>
internal sealed class MyProcessor : BaseProcessor<LogRecord>
{
private readonly string name;
@ -32,6 +32,7 @@ internal class MyProcessor : BaseProcessor<LogRecord>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
Console.WriteLine($"{this.name}.Dispose({disposing})");
}
}

View File

@ -6,7 +6,7 @@ using OpenTelemetry;
namespace ExtendingTheSdk;
public class Program
internal sealed class Program
{
public static void Main()
{
@ -29,16 +29,16 @@ public class Program
// logger.LogInformation($"Hello from potato {0.99}.");
// structured log with template
logger.LogInformation("Hello from {name} {price}.", "tomato", 2.99);
logger.LogInformation("Hello from {Name} {Price}.", "tomato", 2.99);
// structured log with strong type
logger.LogInformation("{food}", new Food { Name = "artichoke", Price = 3.99 });
logger.LogInformation("{Food}", new Food { Name = "artichoke", Price = 3.99 });
// structured log with anonymous type
logger.LogInformation("{food}", new { Name = "pumpkin", Price = 5.99 });
logger.LogInformation("{Food}", new { Name = "pumpkin", Price = 5.99 });
// structured log with general type
logger.LogInformation("{food}", new Dictionary<string, object>
logger.LogInformation("{Food}", new Dictionary<string, object>
{
["Name"] = "truffle",
["Price"] = 299.99,
@ -48,11 +48,11 @@ public class Program
using (logger.BeginScope("[operation]"))
using (logger.BeginScope("[hardware]"))
{
logger.LogError("{name} is broken.", "refrigerator");
logger.LogError("{Name} is broken.", "refrigerator");
}
// message will be redacted by MyRedactionProcessor
logger.LogInformation("OpenTelemetry {sensitiveString}.", "<secret>");
logger.LogInformation("OpenTelemetry {SensitiveString}.", "<secret>");
}
internal struct Food

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA2000;CA1848;CA1510;CA1305</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
</ItemGroup>

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA2213;CA1812;CA1307</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
</ItemGroup>

View File

@ -59,7 +59,7 @@ too frequently. `Meter` is fairly expensive and meant to be reused throughout
the application. For most applications, it can be modeled as static readonly
field (e.g. [Program.cs](./getting-started-console/Program.cs)) or singleton via
dependency injection (e.g.
[Instrumentation.cs](../../examples/AspNetCore/Instrumentation.cs)).
[InstrumentationSource.cs](../../examples/AspNetCore/InstrumentationSource.cs)).
:heavy_check_mark: You should use dot-separated
[UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case) as the
@ -97,7 +97,7 @@ frequently. Instruments are fairly expensive and meant to be reused throughout
the application. For most applications, instruments can be modeled as static
readonly fields (e.g. [Program.cs](./getting-started-console/Program.cs)) or
singleton via dependency injection (e.g.
[Instrumentation.cs](../../examples/AspNetCore/Instrumentation.cs)).
[InstrumentationSource.cs](../../examples/AspNetCore/InstrumentationSource.cs)).
:stop_sign: You should avoid invalid instrument names.

View File

@ -8,7 +8,7 @@ using OpenTelemetry.Resources;
namespace CustomizingTheSdk;
public class Program
internal static class Program
{
private static readonly Meter Meter1 = new("CompanyA.ProductA.Library1", "1.0");
private static readonly Meter Meter2 = new("CompanyA.ProductB.Library2", "1.0");

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA5394</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
</ItemGroup>

View File

@ -8,7 +8,9 @@ using OpenTelemetry.Exporter;
using OpenTelemetry.Metrics;
using OpenTelemetry.Trace;
public class Program
namespace Exemplars;
internal static class Program
{
private static readonly ActivitySource MyActivitySource = new("OpenTelemetry.Demo.Exemplar");
private static readonly Meter MyMeter = new("OpenTelemetry.Demo.Exemplar");

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA5394</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.OpenTelemetryProtocol\OpenTelemetry.Exporter.OpenTelemetryProtocol.csproj" />
</ItemGroup>

View File

@ -5,7 +5,7 @@ using System.Text;
using OpenTelemetry;
using OpenTelemetry.Metrics;
internal class MyExporter : BaseExporter<Metric>
internal sealed class MyExporter : BaseExporter<Metric>
{
private readonly string name;
@ -52,6 +52,7 @@ internal class MyExporter : BaseExporter<Metric>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
Console.WriteLine($"{this.name}.Dispose({disposing})");
}
}

View File

@ -8,7 +8,7 @@ using OpenTelemetry.Metrics;
namespace ExtendingTheSdk;
public class Program
internal static class Program
{
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
private static readonly Counter<long> MyFruitCounter = MyMeter.CreateCounter<long>("MyFruitCounter");

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA2000;CA1510;CA1305</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
</ItemGroup>

View File

@ -5,7 +5,9 @@ using System.Diagnostics.Metrics;
using OpenTelemetry;
using OpenTelemetry.Metrics;
public class Program
namespace GettingStartedConsole;
internal static class Program
{
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
private static readonly Counter<long> MyFruitCounter = MyMeter.CreateCounter<long>("MyFruitCounter");

View File

@ -6,7 +6,9 @@ using OpenTelemetry;
using OpenTelemetry.Exporter;
using OpenTelemetry.Metrics;
public class Program
namespace GettingStartedPrometheusGrafana;
internal static class Program
{
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
private static readonly Counter<long> MyFruitCounter = MyMeter.CreateCounter<long>("MyFruitCounter");

View File

@ -8,7 +8,7 @@ using OpenTelemetry.Metrics;
namespace LearningMoreInstruments;
public class Program
internal static class Program
{
private static readonly Meter MyMeter = new("MyCompany.MyProduct.MyLibrary", "1.0");
private static readonly Histogram<long> MyHistogram = MyMeter.CreateHistogram<long>("MyHistogram");

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA5394</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />

View File

@ -0,0 +1,12 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
using Microsoft.Extensions.Logging;
namespace ExtendingTheSdk;
internal static partial class LoggerExtensions
{
[LoggerMessage(LogLevel.Information, "Hello from {Name} {Price}")]
public static partial void HelloFrom(this ILogger logger, string name, double price);
}

View File

@ -3,7 +3,7 @@
using OpenTelemetry.Resources;
internal class MyResourceDetector : IResourceDetector
internal sealed class MyResourceDetector : IResourceDetector
{
public Resource Detect()
{

View File

@ -11,7 +11,7 @@ using OpenTelemetry.Trace;
namespace ExtendingTheSdk;
public class Program
internal static class Program
{
private static readonly ActivitySource DemoSource = new("OTel.Demo");
private static readonly Meter MeterDemoSource = new("OTel.Demo");
@ -55,7 +55,6 @@ public class Program
}
var logger = loggerFactory.CreateLogger("OTel.Demo");
logger
.LogInformation("Hello from {Name} {Price}", "tomato", 2.99);
logger.HelloFrom("tomato", 2.99);
}
}

View File

@ -49,7 +49,7 @@ too frequently. `ActivitySource` is fairly expensive and meant to be reused
throughout the application. For most applications, it can be modeled as static
readonly field (e.g. [Program.cs](./getting-started-console/Program.cs)) or
singleton via dependency injection (e.g.
[Instrumentation.cs](../../examples/AspNetCore/Instrumentation.cs)).
[InstrumentationSource.cs](../../examples/AspNetCore/InstrumentationSource.cs)).
:heavy_check_mark: You should use dot-separated
[UpperCamelCase](https://en.wikipedia.org/wiki/Camel_case) as the

View File

@ -8,7 +8,7 @@ using OpenTelemetry.Trace;
namespace CustomizingTheSdk;
public class Program
internal static class Program
{
private static readonly ActivitySource MyLibraryActivitySource = new(
"MyCompany.MyProduct.MyLibrary");

View File

@ -4,7 +4,7 @@
using System.Diagnostics;
using OpenTelemetry;
internal class MyEnrichingProcessor : BaseProcessor<Activity>
internal sealed class MyEnrichingProcessor : BaseProcessor<Activity>
{
public override void OnEnd(Activity activity)
{

View File

@ -5,7 +5,7 @@ using System.Diagnostics;
using System.Text;
using OpenTelemetry;
internal class MyExporter : BaseExporter<Activity>
internal sealed class MyExporter : BaseExporter<Activity>
{
private readonly string name;
@ -43,6 +43,7 @@ internal class MyExporter : BaseExporter<Activity>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
Console.WriteLine($"{this.name}.Dispose({disposing})");
}
}

View File

@ -4,7 +4,7 @@
using System.Diagnostics;
using OpenTelemetry;
internal class MyProcessor : BaseProcessor<Activity>
internal sealed class MyProcessor : BaseProcessor<Activity>
{
private readonly string name;
@ -37,6 +37,7 @@ internal class MyProcessor : BaseProcessor<Activity>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
Console.WriteLine($"{this.name}.Dispose({disposing})");
}
}

View File

@ -3,7 +3,7 @@
using OpenTelemetry.Resources;
internal class MyResourceDetector : IResourceDetector
internal sealed class MyResourceDetector : IResourceDetector
{
public Resource Detect()
{

View File

@ -3,7 +3,7 @@
using OpenTelemetry.Trace;
internal class MySampler : Sampler
internal sealed class MySampler : Sampler
{
public override SamplingResult ShouldSample(in SamplingParameters param)
{

View File

@ -8,7 +8,7 @@ using OpenTelemetry.Trace;
namespace ExtendingTheSdk;
public class Program
internal static class Program
{
private static readonly ActivitySource DemoSource = new("OTel.Demo");

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA2000;CA1812;CA1510</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry\OpenTelemetry.csproj" />
</ItemGroup>

View File

@ -5,7 +5,9 @@ using System.Diagnostics;
using OpenTelemetry;
using OpenTelemetry.Trace;
public class Program
namespace GettingStartedConsole;
internal static class Program
{
private static readonly ActivitySource MyActivitySource = new("MyCompany.MyProduct.MyLibrary");
@ -18,9 +20,10 @@ public class Program
using (var activity = MyActivitySource.StartActivity("SayHello"))
{
int[] intArray = [1, 2, 3];
activity?.SetTag("foo", 1);
activity?.SetTag("bar", "Hello, World!");
activity?.SetTag("baz", new int[] { 1, 2, 3 });
activity?.SetTag("baz", intArray);
activity?.SetStatus(ActivityStatusCode.Ok);
}

View File

@ -11,7 +11,7 @@ using OpenTelemetry.Trace;
namespace GettingStartedJaeger;
public class Program
internal static class Program
{
private static readonly ActivitySource MyActivitySource = new("OpenTelemetry.Demo.Jaeger");
@ -33,13 +33,13 @@ public class Program
{
using (var slow = MyActivitySource.StartActivity("SomethingSlow"))
{
await client.GetStringAsync("https://httpstat.us/200?sleep=1000");
await client.GetStringAsync("https://httpstat.us/200?sleep=1000");
await client.GetStringAsync(new Uri("https://httpstat.us/200?sleep=1000")).ConfigureAwait(false);
await client.GetStringAsync(new Uri("https://httpstat.us/200?sleep=1000")).ConfigureAwait(false);
}
using (var fast = MyActivitySource.StartActivity("SomethingFast"))
{
await client.GetStringAsync("https://httpstat.us/301");
await client.GetStringAsync(new Uri("https://httpstat.us/301")).ConfigureAwait(false);
}
}
}

View File

@ -13,7 +13,7 @@ namespace LinksAndParentBasedSamplerExample;
/// links based sampler. If either of these samplers decide to sample,
/// this composite sampler decides to sample.
/// </summary>
internal class LinksAndParentBasedSampler : Sampler
internal sealed class LinksAndParentBasedSampler : Sampler
{
private readonly ParentBasedSampler parentBasedSampler;
private readonly LinksBasedSampler linksBasedSampler;

View File

@ -10,7 +10,7 @@ namespace LinksAndParentBasedSamplerExample;
/// A non-probabilistic sampler that samples an activity if ANY of the linked activities
/// is sampled.
/// </summary>
internal class LinksBasedSampler : Sampler
internal sealed class LinksBasedSampler : Sampler
{
public override SamplingResult ShouldSample(in SamplingParameters samplingParameters)
{

View File

@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
namespace LinksAndParentBasedSamplerExample;
internal class Program
internal static class Program
{
private static readonly ActivitySource MyActivitySource = new("LinksAndParentBasedSampler.Example");
@ -37,7 +37,7 @@ internal class Program
/// Generates a list of activity links. A linked activity is sampled with a probability of 0.1.
/// </summary>
/// <returns>A list of links.</returns>
private static IEnumerable<ActivityLink> GetActivityLinks(int seed)
private static List<ActivityLink> GetActivityLinks(int seed)
{
var random = new Random(seed);
var linkedActivitiesList = new List<ActivityLink>();

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA5394</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
</ItemGroup>

View File

@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
namespace LinksCreationWithNewRootActivitiesDemo;
internal class Program
internal static class Program
{
private static readonly ActivitySource MyActivitySource = new("LinksCreationWithNewRootActivities");
@ -21,7 +21,7 @@ internal class Program
using (var activity = MyActivitySource.StartActivity("OrchestratingActivity"))
{
activity?.SetTag("foo", 1);
await DoFanoutAsync();
await DoFanoutAsync().ConfigureAwait(false);
using (var nestedActivity = MyActivitySource.StartActivity("WrapUp"))
{
@ -77,7 +77,7 @@ internal class Program
}
// Wait for all tasks to complete
await Task.WhenAll(tasks);
await Task.WhenAll(tasks).ConfigureAwait(false);
// Reset to the previous activity now that we are done with the fanout
// This will ensure that the rest of the code executes in the context of the original activity.

View File

@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
namespace ReportingExceptions;
public class Program
internal static class Program
{
private static readonly ActivitySource MyActivitySource = new(
"MyCompany.MyProduct.MyLibrary");
@ -27,7 +27,7 @@ public class Program
{
using (MyActivitySource.StartActivity("Bar"))
{
throw new Exception("Oops!");
throw new InvalidOperationException("Oops!");
}
}
}

View File

@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
namespace StratifiedSamplingByQueryTypeDemo;
internal class Program
internal sealed class Program
{
private static readonly ActivitySource MyActivitySource = new("StratifiedSampling.POC");

View File

@ -5,7 +5,7 @@ using OpenTelemetry.Trace;
namespace StratifiedSamplingByQueryTypeDemo;
internal class StratifiedSampler : Sampler
internal sealed class StratifiedSampler : Sampler
{
// For this POC, we have two groups.
// 0 is the group corresponding to user-initiated queries where we want a 100% sampling rate.

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA5394</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
</ItemGroup>

View File

@ -15,7 +15,7 @@ namespace SDKBasedSpanLevelTailSamplingSample;
/// changed later by a span processor based on span attributes (e.g., failure) that become
/// available only by the end of the span.
/// </summary>
internal class ParentBasedElseAlwaysRecordSampler : Sampler
internal sealed class ParentBasedElseAlwaysRecordSampler : Sampler
{
private const double DefaultSamplingProbabilityForRootSpan = 0.1;
private readonly ParentBasedSampler parentBasedSampler;

View File

@ -7,7 +7,7 @@ using OpenTelemetry.Trace;
namespace SDKBasedSpanLevelTailSamplingSample;
internal class Program
internal static class Program
{
private static readonly ActivitySource MyActivitySource = new("SDK.TailSampling.POC");

View File

@ -26,7 +26,7 @@ internal sealed class TailSamplingProcessor : BaseProcessor<Activity>
}
else
{
this.IncludeForExportIfFailedActivity(activity);
IncludeForExportIfFailedActivity(activity);
}
base.OnEnd(activity);
@ -42,7 +42,7 @@ internal sealed class TailSamplingProcessor : BaseProcessor<Activity>
// 2. Traces will not be complete: Since this sampling is at a span level, the generated trace will be partial and won't be complete.
// For example, if another part of the call tree is successful, those spans may not be sampled in leading to a partial trace.
// 3. If multiple exporters are used, this decision will impact all of them: https://github.com/open-telemetry/opentelemetry-dotnet/issues/3861.
private void IncludeForExportIfFailedActivity(Activity activity)
private static void IncludeForExportIfFailedActivity(Activity activity)
{
if (activity.Status == ActivityStatusCode.Error)
{

View File

@ -1,4 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NoWarn>$(NoWarn);CA5394;CA2000</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\src\OpenTelemetry.Exporter.Console\OpenTelemetry.Exporter.Console.csproj" />
</ItemGroup>

View File

@ -5,6 +5,7 @@ namespace Examples.AspNetCore.Controllers;
using System.Diagnostics;
using System.Diagnostics.Metrics;
using System.Security.Cryptography;
using Examples.AspNetCore;
using Microsoft.AspNetCore.Mvc;
@ -23,24 +24,24 @@ public class WeatherForecastController : ControllerBase
private readonly ActivitySource activitySource;
private readonly Counter<long> freezingDaysCounter;
public WeatherForecastController(ILogger<WeatherForecastController> logger, Instrumentation instrumentation)
public WeatherForecastController(ILogger<WeatherForecastController> logger, InstrumentationSource instrumentationSource)
{
this.logger = logger ?? throw new ArgumentNullException(nameof(logger));
ArgumentNullException.ThrowIfNull(instrumentation);
this.activitySource = instrumentation.ActivitySource;
this.freezingDaysCounter = instrumentation.FreezingDaysCounter;
ArgumentNullException.ThrowIfNull(instrumentationSource);
this.activitySource = instrumentationSource.ActivitySource;
this.freezingDaysCounter = instrumentationSource.FreezingDaysCounter;
}
[HttpGet]
public IEnumerable<WeatherForecast> Get()
{
using var scope = this.logger.BeginScope("{Id}", Guid.NewGuid().ToString("N"));
using var scope = this.logger.BeginIdScope(Guid.NewGuid().ToString("N"));
// Making an http call here to serve as an example of
// Making a http call here to serve as an example of
// how dependency calls will be captured and treated
// automatically as child of incoming request.
var res = HttpClient.GetStringAsync("http://google.com").Result;
var res = HttpClient.GetStringAsync(new Uri("http://google.com")).Result;
// Optional: Manually create an activity. This will become a child of
// the activity created from the instrumentation library for AspNetCore.
@ -52,22 +53,18 @@ public class WeatherForecastController : ControllerBase
// a manual activity using Activity.Current?.SetTag()
using var activity = this.activitySource.StartActivity("calculate forecast");
var rng = new Random();
var forecast = Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)],
TemperatureC = RandomNumberGenerator.GetInt32(-20, 55),
Summary = Summaries[RandomNumberGenerator.GetInt32(Summaries.Length)],
})
.ToArray();
// Optional: Count the freezing days
this.freezingDaysCounter.Add(forecast.Count(f => f.TemperatureC < 0));
this.logger.LogInformation(
"WeatherForecasts generated {count}: {forecasts}",
forecast.Length,
forecast);
this.logger.WeatherForecastGenerated(LogLevel.Information, forecast.Length, forecast);
return forecast;
}

View File

@ -0,0 +1,14 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
namespace Examples.AspNetCore.Controllers;
internal static partial class WeatherForecastControllerLog
{
private static readonly Func<ILogger, string, IDisposable?> Scope = LoggerMessage.DefineScope<string>("{Id}");
public static IDisposable? BeginIdScope(this ILogger logger, string id) => Scope(logger, id);
[LoggerMessage(EventId = 1, Message = "WeatherForecasts generated {Count}: {Forecasts}")]
public static partial void WeatherForecastGenerated(this ILogger logger, LogLevel logLevel, int count, WeatherForecast[] forecasts);
}

View File

@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
<NoWarn>$(NoWarn);CA1515</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@ -11,15 +11,15 @@ using System.Diagnostics.Metrics;
/// ActivitySource and Instruments. This avoids possible type collisions
/// with other components in the DI container.
/// </summary>
public class Instrumentation : IDisposable
public sealed class InstrumentationSource : IDisposable
{
internal const string ActivitySourceName = "Examples.AspNetCore";
internal const string MeterName = "Examples.AspNetCore";
private readonly Meter meter;
public Instrumentation()
public InstrumentationSource()
{
string? version = typeof(Instrumentation).Assembly.GetName().Version?.ToString();
string? version = typeof(InstrumentationSource).Assembly.GetName().Version?.ToString();
this.ActivitySource = new ActivitySource(ActivitySourceName, version);
this.meter = new Meter(MeterName, version);
this.FreezingDaysCounter = this.meter.CreateCounter<long>("weather.days.freezing", description: "The number of days where the temperature is below freezing");

View File

@ -13,20 +13,20 @@ using OpenTelemetry.Trace;
var appBuilder = WebApplication.CreateBuilder(args);
// Note: Switch between Zipkin/OTLP/Console by setting UseTracingExporter in appsettings.json.
var tracingExporter = appBuilder.Configuration.GetValue("UseTracingExporter", defaultValue: "console").ToLowerInvariant();
var tracingExporter = appBuilder.Configuration.GetValue("UseTracingExporter", defaultValue: "CONSOLE").ToUpperInvariant();
// Note: Switch between Prometheus/OTLP/Console by setting UseMetricsExporter in appsettings.json.
var metricsExporter = appBuilder.Configuration.GetValue("UseMetricsExporter", defaultValue: "console").ToLowerInvariant();
var metricsExporter = appBuilder.Configuration.GetValue("UseMetricsExporter", defaultValue: "CONSOLE").ToUpperInvariant();
// Note: Switch between Console/OTLP by setting UseLogExporter in appsettings.json.
var logExporter = appBuilder.Configuration.GetValue("UseLogExporter", defaultValue: "console").ToLowerInvariant();
var logExporter = appBuilder.Configuration.GetValue("UseLogExporter", defaultValue: "CONSOLE").ToUpperInvariant();
// Note: Switch between Explicit/Exponential by setting HistogramAggregation in appsettings.json
var histogramAggregation = appBuilder.Configuration.GetValue("HistogramAggregation", defaultValue: "explicit").ToLowerInvariant();
var histogramAggregation = appBuilder.Configuration.GetValue("HistogramAggregation", defaultValue: "EXPLICIT").ToUpperInvariant();
// Create a service to expose ActivitySource, and Metric Instruments
// for manual instrumentation
appBuilder.Services.AddSingleton<Instrumentation>();
appBuilder.Services.AddSingleton<InstrumentationSource>();
// Clear default logging providers used by WebApplication host.
appBuilder.Logging.ClearProviders();
@ -45,7 +45,7 @@ appBuilder.Services.AddOpenTelemetry()
// Ensure the TracerProvider subscribes to any custom ActivitySources.
builder
.AddSource(Instrumentation.ActivitySourceName)
.AddSource(InstrumentationSource.ActivitySourceName)
.SetSampler(new AlwaysOnSampler())
.AddHttpClientInstrumentation()
.AddAspNetCoreInstrumentation();
@ -55,7 +55,7 @@ appBuilder.Services.AddOpenTelemetry()
switch (tracingExporter)
{
case "zipkin":
case "ZIPKIN":
builder.AddZipkinExporter();
builder.ConfigureServices(services =>
@ -65,7 +65,7 @@ appBuilder.Services.AddOpenTelemetry()
});
break;
case "otlp":
case "OTLP":
builder.AddOtlpExporter(otlpOptions =>
{
// Use IConfiguration directly for Otlp exporter endpoint option.
@ -84,7 +84,7 @@ appBuilder.Services.AddOpenTelemetry()
// Ensure the MeterProvider subscribes to any custom Meters.
builder
.AddMeter(Instrumentation.MeterName)
.AddMeter(InstrumentationSource.MeterName)
.SetExemplarFilter(ExemplarFilterType.TraceBased)
.AddRuntimeInstrumentation()
.AddHttpClientInstrumentation()
@ -92,7 +92,7 @@ appBuilder.Services.AddOpenTelemetry()
switch (histogramAggregation)
{
case "exponential":
case "EXPONENTIAL":
builder.AddView(instrument =>
{
return instrument.GetType().GetGenericTypeDefinition() == typeof(Histogram<>)
@ -108,10 +108,10 @@ appBuilder.Services.AddOpenTelemetry()
switch (metricsExporter)
{
case "prometheus":
case "PROMETHEUS":
builder.AddPrometheusExporter();
break;
case "otlp":
case "OTLP":
builder.AddOtlpExporter(otlpOptions =>
{
// Use IConfiguration directly for Otlp exporter endpoint option.
@ -129,7 +129,7 @@ appBuilder.Services.AddOpenTelemetry()
switch (logExporter)
{
case "otlp":
case "OTLP":
builder.AddOtlpExporter(otlpOptions =>
{
// Use IConfiguration directly for Otlp exporter endpoint option.

View File

@ -1,4 +1,3 @@
version: "3"
services:
# OTEL Collector to receive logs, metrics and traces from the application

View File

@ -6,7 +6,9 @@ distributor:
otlp:
protocols:
http:
endpoint: 0.0.0.0:4318
grpc:
endpoint: 0.0.0.0:4317
storage:
trace:

View File

@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(DefaultTargetFrameworkForExampleApps)</TargetFramework>
<NoWarn>$(NoWarn),CS0618</NoWarn>
<NoWarn>$(NoWarn),CA1812</NoWarn>
</PropertyGroup>
<ItemGroup>

View File

@ -8,7 +8,7 @@ using System.Text;
namespace Examples.Console;
internal class InstrumentationWithActivitySource : IDisposable
internal sealed class InstrumentationWithActivitySource : IDisposable
{
private const string RequestPath = "/api/request";
private readonly SampleServer server = new();
@ -27,7 +27,7 @@ internal class InstrumentationWithActivitySource : IDisposable
this.server.Dispose();
}
private class SampleServer : IDisposable
private sealed class SampleServer : IDisposable
{
private readonly HttpListener listener = new();
@ -66,7 +66,7 @@ internal class InstrumentationWithActivitySource : IDisposable
}
activity?.SetTag("request.content", requestContent);
activity?.SetTag("request.length", requestContent.Length.ToString());
activity?.SetTag("request.length", requestContent.Length);
var echo = Encoding.UTF8.GetBytes("echo: " + requestContent);
context.Response.ContentEncoding = Encoding.UTF8;
@ -88,7 +88,7 @@ internal class InstrumentationWithActivitySource : IDisposable
}
}
private class SampleClient : IDisposable
private sealed class SampleClient : IDisposable
{
private CancellationTokenSource? cts;
private Task? requestTask;
@ -114,7 +114,7 @@ internal class InstrumentationWithActivitySource : IDisposable
count++;
activity?.AddEvent(new ActivityEvent("PostAsync:Started"));
using var response = await client.PostAsync(url, content, cancellationToken).ConfigureAwait(false);
using var response = await client.PostAsync(new Uri(url, UriKind.Absolute), content, cancellationToken).ConfigureAwait(false);
activity?.AddEvent(new ActivityEvent("PostAsync:Ended"));
activity?.SetTag("http.status_code", (int)response.StatusCode);

Some files were not shown because too many files have changed in this diff Show More