Skip to content

Commit 9ca14ca

Browse files
authored
Merge branch 'main' into update-community-members
2 parents d1c16d6 + 7d6e80a commit 9ca14ca

16 files changed

+75
-73
lines changed

.github/workflows/survey-on-merged-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [closed]
66

77
env:
8-
PR_NUM: ${{ github.event.issue.number }}
8+
PR_NUM: ${{ github.event.pull_request.number }}
99
SURVEY_URL: https://forms.gle/WV58koUBGSG9HBY66
1010

1111
jobs:

content/en/docs/languages/ruby/getting-started.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You will learn how you can instrument a simple application, in such a way that
1616

1717
Ensure that you have the following installed locally:
1818

19-
- CRuby >= `3.0`, JRuby >= `9.3.2.0`, or TruffleRuby >= 22.1
19+
- CRuby >= `3.0`, JRuby >= `9.3.2.0`, or TruffleRuby >= `22.1`
2020
- [Bundler](https://bundler.io/)
2121

2222
{{% alert title="Warning" color="warning" %}} While tested, support for `jruby`

data/registry/instrumentation-dotnet-aspnet-telemetryhttpmodule.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ isFirstParty: false
2121
package:
2222
registry: nuget
2323
name: OpenTelemetry.Instrumentation.AspNet.TelemetryHttpModule
24-
version: 1.10.0-beta.1
24+
version: 1.11.0-beta.1

data/registry/instrumentation-dotnet-aspnet.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ isFirstParty: false
1818
package:
1919
registry: nuget
2020
name: OpenTelemetry.Instrumentation.AspNet
21-
version: 1.10.0-beta.1
21+
version: 1.11.0-beta.1

data/registry/instrumentation-dotnet-aspnetcore.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ isFirstParty: false
1919
package:
2020
registry: nuget
2121
name: OpenTelemetry.Instrumentation.AspNetCore
22-
version: 1.10.1
22+
version: 1.11.0

data/registry/instrumentation-dotnet-entityframeworkcore.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ isFirstParty: false
2020
package:
2121
registry: nuget
2222
name: OpenTelemetry.Instrumentation.EntityFrameworkCore
23-
version: 1.10.0-beta.1
23+
version: 1.11.0-beta.1

data/registry/instrumentation-dotnet-grpcnetclient.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ isFirstParty: false
1919
package:
2020
registry: nuget
2121
name: OpenTelemetry.Instrumentation.GrpcNetClient
22-
version: 1.10.0-beta.1
22+
version: 1.11.0-beta.1

data/registry/instrumentation-dotnet-http.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ isFirstParty: false
1919
package:
2020
registry: nuget
2121
name: OpenTelemetry.Instrumentation.Http
22-
version: 1.10.0
22+
version: 1.11.0

data/registry/instrumentation-dotnet-process.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ isFirstParty: false
1818
package:
1919
registry: nuget
2020
name: OpenTelemetry.Instrumentation.Process
21-
version: 1.10.0-beta.1
21+
version: 1.11.0-beta.1

data/registry/instrumentation-dotnet-quartz.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ isFirstParty: false
1616
package:
1717
registry: nuget
1818
name: OpenTelemetry.Instrumentation.Quartz
19-
version: 1.10.0-beta.1
19+
version: 1.11.0-beta.1

data/registry/instrumentation-dotnet-runtime.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ isFirstParty: false
2020
package:
2121
registry: nuget
2222
name: OpenTelemetry.Instrumentation.Runtime
23-
version: 1.10.0
23+
version: 1.11.0

data/registry/instrumentation-dotnet-sqlclient.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ isFirstParty: false
1919
package:
2020
registry: nuget
2121
name: OpenTelemetry.Instrumentation.SqlClient
22-
version: 1.10.0-beta.1
22+
version: 1.11.0-beta.1

data/registry/instrumentation-dotnet-stackexchangeredis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ isFirstParty: false
2020
package:
2121
registry: nuget
2222
name: OpenTelemetry.Instrumentation.StackExchangeRedis
23-
version: 1.10.0-beta.1
23+
version: 1.11.0-beta.1

data/registry/instrumentation-dotnet-wcf.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ isFirstParty: false
1818
package:
1919
registry: nuget
2020
name: OpenTelemetry.Instrumentation.Wcf
21-
version: 1.10.0-beta.1
21+
version: 1.11.0-beta.1

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"all": "bash -c 'x=0; for c in \"$@\"; do npm run $c || x=$((x+1)); done; ((!x)) || (echo \"ERROR: some scripts failed!\" && exit 1)' -",
4545
"build:preview": "set -x && npm run _build -- --minify",
4646
"build:production": "npm run _hugo -- --minify",
47-
"build": "npm run _build",
47+
"build": "npm run _build --",
4848
"cd:public": "cd public &&",
4949
"check:expired": "find content -name '*.md' | xargs ./scripts/list-expired.pl",
5050
"check:filenames": "test -z \"$(npm run -s _ls-bad-filenames)\" || npm run -s _filename-error",

scripts/content-modules/normalize-titles.pl

+60-58
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/perl -w -i
22
#
33
# DRAFT script used to normalize semconv doc-page tiles and add Hugo front matter
4-
#
54

65
$^W = 1;
76

@@ -30,43 +29,31 @@
3029
my $beforeTitle = '';
3130

3231
sub toTitleCase($) {
33-
my $str = shift;
32+
my ($str) = @_;
3433

35-
my @mixedCaseWords; # mixed-case or ALLCAPS
36-
while ($str =~ /\b([a-z]?[A-Z][A-Z0-9]+|[A-Z]\w*[A-Z]\w*)\b/g) {
37-
push @mixedCaseWords, $1;
38-
}
34+
# Capitalize non-mixedcase words
35+
$str =~ s/(^|\s)([a-zA-Z])([a-z][a-z0-9]*)\b/$1\u$2$3/g;
3936

40-
$str =~ s/(\w+)/\u\L$1/g;
37+
# Revert / lowercase articles etc.
38+
$str =~ s/\b(A|And|As|By|For|In|On)\b/\L$1/g;
4139

42-
foreach my $word (@mixedCaseWords) {
43-
my $lc_word = lc($word);
44-
$str =~ s/\b$lc_word\b/$word/ig;
45-
}
46-
$str =~ s/\b(A|And|As|By|For|In|On|\.Js)\b/\L$1/g;
4740
return $str;
4841
}
4942

50-
my @specialWords = qw(Core); # for .NET
51-
5243
sub toSentenceCase($) {
53-
my $str = shift;
44+
my ($str) = @_;
5445

55-
my @mixedCaseWords = @specialWords; # mixed-case or ALLCAPS
56-
while ($str =~ /\b([a-z]?[A-Z][A-Z0-9]+|[A-Z]\w*[A-Z]\w*)\b/g) {
57-
push @mixedCaseWords, $1;
58-
}
46+
# Lowercase non-mixedcase words
47+
$str =~ s/\b([A-Z]?[a-z][a-z0-9]*)\b/\l$1/g;
5948

60-
$str = lc $str;
49+
# Capitalize the first word unless it is mixed case
50+
$str =~ s/^([a-z][a-z0-9]*)\b/\u$1/;
6151

62-
# Replace words with their mixed-case or ALL CAPS versions
63-
foreach my $word (@mixedCaseWords) {
64-
my $lc_word = lc($word);
65-
$str =~ s/\b\Q$lc_word\E\b/$word/g;
66-
}
67-
68-
# Capitalize the first letter of the string
69-
$str =~ s/^(\s*\w)/\u$1/;
52+
# Handle exceptions
53+
$str =~ s/(.NET) (core)/$1 \u$2/;
54+
$str =~ s/(AI) (inference)/$1 \u$2/;
55+
$str =~ s|google cloud|Google Cloud|i;
56+
$str =~ s|pub/sub|Pub/Sub|;
7057

7158
return $str;
7259
}
@@ -75,7 +62,7 @@ ()
7562
my $frontMatter = '';
7663
if ($frontMatterFromFile) {
7764
# printf STDOUT "> $file has front matter:\n$frontMatterFromFile\n"; # if $gD;
78-
$frontMatterFromFile = '' unless $frontMatterFromFile =~ /aliases|cSpell|cascade/i;
65+
$frontMatterFromFile = '' unless $frontMatterFromFile =~ /auto_gen|aliases/i;
7966
# printf STDOUT "> $file\n" if $ARGV =~ /\/system\b/;
8067
}
8168
$linkTitle = $title;
@@ -104,19 +91,20 @@ ()
10491
$linkTitle = $1;
10592
}
10693

107-
$linkTitle = 'Attributes' if $title eq 'General Attributes';
10894
$linkTitle = 'Events' if $linkTitle =~ /Mobile Events/;
10995
$linkTitle = 'Connect' if $title =~ /Connect RPC$/i;
11096
$linkTitle = 'HTTP' if $linkTitle =~ /^HTTP Client and Server/i;
11197
$linkTitle = 'SQL' if $title =~ /SQL Databases$/i;
11298
$linkTitle = 'System use cases' if $title =~ /System .*?General Use Cases/i;
99+
$linkTitle = $1 if $title =~ /Gen(?:erative) ?AI (\w+)$/i && $title !~ /Systems$/i;
100+
$linkTitle = $1 if $title =~ /(OpenAI) \w+$/i;
113101

114102
# Missing an `s` in "Semantic Convention"?
115103
if ($title =~ /^Semantic Convention\b/i and $title !~ /Groups$/i) {
116104
$title =~ s/Semantic Convention\b/$&s/ig;
117105
printf STDOUT "> $title -> $linkTitle - added 's' to 'Conventions'\n";
118106
}
119-
$linkTitle =~ s/^Database Client //;
107+
$linkTitle =~ s/^(Database|Messaging) Client //;
120108
if ($ARGV =~ /docs\/azure/) {
121109
$linkTitle =~ s/ Resource Logs?//i;
122110
$linkTitle =~ s/Azure //i;
@@ -129,6 +117,8 @@ ()
129117
unless $ARGV =~ /gen-ai-metrics/;
130118
$linkTitle =~ s/ (components|guide|queries|supplementary information|systems|platform)$//i;
131119
$linkTitle =~ s/ \(command line interface\)//i;
120+
$linkTitle =~ s/ resources$//i;
121+
$linkTitle =~ s/(Process) and process runtime$/$1/i;
132122

133123
$linkTitle = '.NET' if $linkTitle =~ /.net common language runtime/i;
134124
$linkTitle = 'CLI' if $linkTitle =~ /\(command line interface\) programs/i;
@@ -137,53 +127,68 @@ ()
137127
$linkTitle =~ s/Semantic Conventions? Stability //i;
138128
}
139129

140-
if ($linkTitle and $linkTitle ne $title) {
141-
$linkTitle = toSentenceCase($linkTitle) unless $linkTitle =~ /^gRPC/;
142-
if ($frontMatterFromFile =~ /linkTitle: /) {
143-
$frontMatterFromFile =~ s/^(linkTitle: ).*$/$1$linkTitle/m;
144-
} else {
145-
$frontMatter .= "linkTitle: $linkTitle\n"
130+
$frontMatter .= $frontMatterFromFile if $frontMatterFromFile;
131+
132+
if ($linkTitle && $linkTitle ne $title) {
133+
$linkTitle = toSentenceCase($linkTitle); # unless $linkTitle =~ /^gRPC/;
134+
if ($frontMatter !~ /linkTitle: /) {
135+
$frontMatter .= "linkTitle: $linkTitle\n";
136+
} elsif ($frontMatter !~ /^auto_gen:/m) {
137+
$frontMatter =~ s/^(linkTitle: ).*$/$1$linkTitle/m;
146138
}
147139
}
148140

149-
$frontMatter .= $frontMatterFromFile if $frontMatterFromFile;
150-
151141
if ($ARGV =~ /docs\/(.*?)(README|_index).md$/) {
152142
$frontMatter .= "path_base_for_github_subdir:\n";
153143
$frontMatter .= " from: tmp/semconv/docs/$1_index.md\n";
154144
$frontMatter .= " to: $1README.md\n";
155145
}
156-
$frontMatter .= "weight: -1\n" if $title eq 'General Semantic Conventions';
157146

158147
return $frontMatter;
159148
}
160149

161150
sub printTitleAndFrontMatter() {
162-
my $frontMatter;
163-
164-
165-
# if ($ARGV =~ /docs\/(README|_index)/) {
166-
# print STDOUT "> $ARGV\n > frontMatterFromFile: $frontMatterFromFile\n";
167-
# print STDOUT " > title: $title\n";
168-
# print STDOUT " > linkTitle: $linkTitle\n";
169-
# }
170-
171-
if ($frontMatterFromFile && $frontMatterFromFile =~ /auto_gen:\s*false/) {
172-
$frontMatter = $frontMatterFromFile;
173-
} else {
174-
$frontMatter = computeTitleAndFrontMatter();
175-
}
151+
my $frontMatter = computeTitleAndFrontMatter();
176152

177153
if ($frontMatter) {
178154
$frontMatter = "<!--- Hugo front matter used to generate the website version of this page:\n" . $frontMatter;
179155
$frontMatter .= "--->\n";
180156
print "$frontMatter\n";
181157
}
158+
182159
print $beforeTitle if $beforeTitle;
183160
$title = toTitleCase($title);
184161
print "# $title\n"
185162
}
186163

164+
sub gatherFrontMatter() {
165+
my $autoGenValues = 'false|below';
166+
my $autoGenDirective = '';
167+
my $autoGenSkip = 0;
168+
169+
while(<>) {
170+
last if /^--->/;
171+
next if $autoGenSkip;
172+
173+
my ($keyWord, $autoGenDirective) = /^(auto.?gen): ([^\#]+)/;
174+
if ($keyWord) {
175+
# print STDOUT ">> $ARGV:\n$frontMatterFromFile";
176+
if ($keyWord ne 'auto_gen') {
177+
warn "$ARGV: WARN: misspelled keyword, should be 'auto_gen' not '$keyWord'\n";
178+
} elsif (!$autoGenDirective or $autoGenDirective !~ /^($autoGenValues)/) {
179+
warn "$ARGV: WARN: missing or unrecognized 'auto_gen' value, should match '$autoGenValues', not $autoGenDirective\n";
180+
} elsif ($autoGenDirective =~ /^below/) {
181+
$autoGenSkip = 1;
182+
# print STDOUT ">>>> skipping\n";
183+
} else {
184+
# print STDOUT ">> wa?\n";
185+
}
186+
}
187+
188+
$frontMatterFromFile .= $_;
189+
}
190+
}
191+
187192
# main
188193

189194
my $titleRegexStr = '^#\s+(.*)';
@@ -200,10 +205,7 @@ ()
200205
$beforeTitle = '';
201206
$linkTitle = '';
202207
if (/^<!--- Hugo/) {
203-
while(<>) {
204-
last if /^--->/;
205-
$frontMatterFromFile .= $_;
206-
}
208+
gatherFrontMatter();
207209
next;
208210
}
209211
}

0 commit comments

Comments
 (0)