Skip to content

Commit 2f76c24

Browse files
authored
[SemanticConvention] Migrate generation to Weaver and bump version to 1.26 (open-telemetry#2040)
1 parent f3b4c2f commit 2f76c24

Some content is hidden

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

68 files changed

+2792
-2261
lines changed

build/scripts/sanitycheck.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
LF = b'\n'
1010

1111
# Add paths to exclude from sanity checks here
12+
# Mostly used for auto-generated code
1213
exclude_folders = [
1314
"src/OpenTelemetry.SemanticConventions/Attributes"
1415
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#nullable enable

src/OpenTelemetry.SemanticConventions/.publicApi/PublicAPI.Unshipped.txt

Lines changed: 868 additions & 811 deletions
Large diffs are not rendered by default.

src/OpenTelemetry.SemanticConventions/Attributes/AndroidAttributes.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
// <auto-generated>This file has been auto generated from scripts/templates/SemanticConventionsAttributes.cs.j2</auto-generated>
4+
// <auto-generated>This file has been auto generated from 'src\OpenTelemetry.SemanticConventions\scripts\templates\registry\SemanticConventionsAttributes.cs.j2' </auto-generated>
55

6-
#pragma warning disable CS1570 // XML comment has badly formed XML
6+
#nullable enable
77

8-
using System;
8+
#pragma warning disable CS1570 // XML comment has badly formed XML
99

1010
namespace OpenTelemetry.SemanticConventions;
1111

@@ -15,35 +15,35 @@ namespace OpenTelemetry.SemanticConventions;
1515
public static class AndroidAttributes
1616
{
1717
/// <summary>
18-
/// Uniquely identifies the framework API revision offered by a version (<c>os.version</c>) of the android operating system. More information can be found <a href="https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels">here</a>.
18+
/// Uniquely identifies the framework API revision offered by a version (<c>os.version</c>) of the android operating system. More information can be found <a href="https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels">here</a>
1919
/// </summary>
2020
public const string AttributeAndroidOsApiLevel = "android.os.api_level";
2121

2222
/// <summary>
23-
/// This attribute represents the state the application has transitioned into at the occurrence of the event.
23+
/// Deprecated use the <c>device.app.lifecycle</c> event definition including <c>android.state</c> as a payload field instead
2424
/// </summary>
2525
/// <remarks>
26-
/// The Android lifecycle states are defined in <a href="https://developer.android.com/guide/components/activities/activity-lifecycle#lc">Activity lifecycle callbacks</a>, and from which the <c>OS identifiers</c> are derived.
26+
/// The Android lifecycle states are defined in <a href="https://developer.android.com/guide/components/activities/activity-lifecycle#lc">Activity lifecycle callbacks</a>, and from which the <c>OS identifiers</c> are derived
2727
/// </remarks>
2828
public const string AttributeAndroidState = "android.state";
2929

3030
/// <summary>
31-
/// This attribute represents the state the application has transitioned into at the occurrence of the event.
31+
/// Deprecated use the <c>device.app.lifecycle</c> event definition including <c>android.state</c> as a payload field instead
3232
/// </summary>
3333
public static class AndroidStateValues
3434
{
3535
/// <summary>
36-
/// Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time.
36+
/// Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time
3737
/// </summary>
3838
public const string Created = "created";
3939

4040
/// <summary>
41-
/// Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state.
41+
/// Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state
4242
/// </summary>
4343
public const string Background = "background";
4444

4545
/// <summary>
46-
/// Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states.
46+
/// Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states
4747
/// </summary>
4848
public const string Foreground = "foreground";
4949
}

src/OpenTelemetry.SemanticConventions/Attributes/AspnetcoreAttributes.cs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
// <auto-generated>This file has been auto generated from scripts/templates/SemanticConventionsAttributes.cs.j2</auto-generated>
4+
// <auto-generated>This file has been auto generated from 'src\OpenTelemetry.SemanticConventions\scripts\templates\registry\SemanticConventionsAttributes.cs.j2' </auto-generated>
55

6-
#pragma warning disable CS1570 // XML comment has badly formed XML
6+
#nullable enable
77

8-
using System;
8+
#pragma warning disable CS1570 // XML comment has badly formed XML
99

1010
namespace OpenTelemetry.SemanticConventions;
1111

@@ -15,104 +15,104 @@ namespace OpenTelemetry.SemanticConventions;
1515
public static class AspnetcoreAttributes
1616
{
1717
/// <summary>
18-
/// ASP.NET Core exception middleware handling result.
18+
/// ASP.NET Core exception middleware handling result
1919
/// </summary>
2020
public const string AttributeAspnetcoreDiagnosticsExceptionResult = "aspnetcore.diagnostics.exception.result";
2121

2222
/// <summary>
23-
/// Full type name of the <a href="https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler"><c>IExceptionHandler</c></a> implementation that handled the exception.
23+
/// Full type name of the <a href="https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler"><c>IExceptionHandler</c></a> implementation that handled the exception
2424
/// </summary>
2525
public const string AttributeAspnetcoreDiagnosticsHandlerType = "aspnetcore.diagnostics.handler.type";
2626

2727
/// <summary>
28-
/// Rate limiting policy name.
28+
/// Rate limiting policy name
2929
/// </summary>
3030
public const string AttributeAspnetcoreRateLimitingPolicy = "aspnetcore.rate_limiting.policy";
3131

3232
/// <summary>
33-
/// Rate-limiting result, shows whether the lease was acquired or contains a rejection reason.
33+
/// Rate-limiting result, shows whether the lease was acquired or contains a rejection reason
3434
/// </summary>
3535
public const string AttributeAspnetcoreRateLimitingResult = "aspnetcore.rate_limiting.result";
3636

3737
/// <summary>
38-
/// Flag indicating if request was handled by the application pipeline.
38+
/// Flag indicating if request was handled by the application pipeline
3939
/// </summary>
4040
public const string AttributeAspnetcoreRequestIsUnhandled = "aspnetcore.request.is_unhandled";
4141

4242
/// <summary>
43-
/// A value that indicates whether the matched route is a fallback route.
43+
/// A value that indicates whether the matched route is a fallback route
4444
/// </summary>
4545
public const string AttributeAspnetcoreRoutingIsFallback = "aspnetcore.routing.is_fallback";
4646

4747
/// <summary>
48-
/// Match result - success or failure.
48+
/// Match result - success or failure
4949
/// </summary>
5050
public const string AttributeAspnetcoreRoutingMatchStatus = "aspnetcore.routing.match_status";
5151

5252
/// <summary>
53-
/// ASP.NET Core exception middleware handling result.
53+
/// ASP.NET Core exception middleware handling result
5454
/// </summary>
5555
public static class AspnetcoreDiagnosticsExceptionResultValues
5656
{
5757
/// <summary>
58-
/// Exception was handled by the exception handling middleware.
58+
/// Exception was handled by the exception handling middleware
5959
/// </summary>
6060
public const string Handled = "handled";
6161

6262
/// <summary>
63-
/// Exception was not handled by the exception handling middleware.
63+
/// Exception was not handled by the exception handling middleware
6464
/// </summary>
6565
public const string Unhandled = "unhandled";
6666

6767
/// <summary>
68-
/// Exception handling was skipped because the response had started.
68+
/// Exception handling was skipped because the response had started
6969
/// </summary>
7070
public const string Skipped = "skipped";
7171

7272
/// <summary>
73-
/// Exception handling didn't run because the request was aborted.
73+
/// Exception handling didn't run because the request was aborted
7474
/// </summary>
7575
public const string Aborted = "aborted";
7676
}
7777

7878
/// <summary>
79-
/// Rate-limiting result, shows whether the lease was acquired or contains a rejection reason.
79+
/// Rate-limiting result, shows whether the lease was acquired or contains a rejection reason
8080
/// </summary>
8181
public static class AspnetcoreRateLimitingResultValues
8282
{
8383
/// <summary>
84-
/// Lease was acquired.
84+
/// Lease was acquired
8585
/// </summary>
8686
public const string Acquired = "acquired";
8787

8888
/// <summary>
89-
/// Lease request was rejected by the endpoint limiter.
89+
/// Lease request was rejected by the endpoint limiter
9090
/// </summary>
9191
public const string EndpointLimiter = "endpoint_limiter";
9292

9393
/// <summary>
94-
/// Lease request was rejected by the global limiter.
94+
/// Lease request was rejected by the global limiter
9595
/// </summary>
9696
public const string GlobalLimiter = "global_limiter";
9797

9898
/// <summary>
99-
/// Lease request was canceled.
99+
/// Lease request was canceled
100100
/// </summary>
101101
public const string RequestCanceled = "request_canceled";
102102
}
103103

104104
/// <summary>
105-
/// Match result - success or failure.
105+
/// Match result - success or failure
106106
/// </summary>
107107
public static class AspnetcoreRoutingMatchStatusValues
108108
{
109109
/// <summary>
110-
/// Match succeeded.
110+
/// Match succeeded
111111
/// </summary>
112112
public const string Success = "success";
113113

114114
/// <summary>
115-
/// Match failed.
115+
/// Match failed
116116
/// </summary>
117117
public const string Failure = "failure";
118118
}

0 commit comments

Comments
 (0)