|
93 | 93 | return 0;
|
94 | 94 | }
|
95 | 95 |
|
96 |
| -sub patchAttrNaming() { |
97 |
| - return unless $ARGV =~ /^tmp\/otel\/specification/ |
98 |
| - && applyPatchOrPrintMsgIf('2025-01-22-attribute-naming', 'semconv', '1.29.0'); |
99 |
| - |
100 |
| - my $semconv_attr_naming = '(/docs/specs/semconv/general)/naming/'; |
101 |
| - s|$semconv_attr_naming|$1/attribute-naming/|g if /$semconv_attr_naming/; |
102 |
| -} |
103 |
| - |
104 | 96 | sub patchEventAliases() {
|
105 | 97 | return unless $ARGV =~ /^tmp\/otel\/specification\/logs\//
|
106 | 98 | && applyPatchOrPrintMsgIf('2025-01-23-event-aliases', 'spec', '1.41.0');
|
|
109 | 101 | s|$aliases|$1./$2|g if /$aliases/;
|
110 | 102 | }
|
111 | 103 |
|
112 |
| -sub patchSemConvAlias() { |
113 |
| - return unless $ARGV =~ /^tmp\/semconv\/docs\/general\// |
114 |
| - && applyPatchOrPrintMsgIf('2025-01-23-general-aliases', 'semconv', '1.29.0'); |
| 104 | +sub patchSemConvEmitAnEvent() { |
| 105 | + return unless $ARGV =~ /^tmp\/semconv\/docs\// |
| 106 | + && applyPatchOrPrintMsgIf('2025-01-24-emit-an-event', 'semconv', '1.30.0'); |
115 | 107 |
|
116 |
| - my $aliases = '\[docs/specs/semconv/general/(trace-general)\]'; |
117 |
| - s|$aliases|[$1]|g if /$aliases/; |
| 108 | + s|Emit Event API|Log API|; |
| 109 | + my $path = '(docs/specs/otel/logs/api.md#emit-a)n-event'; |
| 110 | + s|$path|$1-logrecord|g if /$path/; |
118 | 111 | }
|
119 | 112 |
|
120 | 113 | sub getVersFromSubmodule() {
|
|
158 | 151 | while(<>) {
|
159 | 152 | $lineNum++;
|
160 | 153 | last if /^-?-->/;
|
161 |
| - patchAttrNaming(); |
162 | 154 | patchEventAliases();
|
163 |
| - patchSemConvAlias(); |
164 | 155 | $frontMatterFromFile .= $_;
|
165 | 156 | }
|
166 | 157 | next;
|
|
193 | 184 | ## Semconv
|
194 | 185 |
|
195 | 186 | if ($ARGV =~ /^tmp\/semconv/) {
|
196 |
| - if (applyPatchOrPrintMsgIf('2025-01-22-event-(api|sdk)', 'semconv', '1.29.0')) { |
197 |
| - # Cf. https://github.com/open-telemetry/opentelemetry-specification/pull/4359 |
198 |
| - my $otel_spec_event_deprecation = '(opentelemetry-specification/blob/main/specification/logs)/event-(api|sdk).md'; |
199 |
| - s|$otel_spec_event_deprecation\b|$1/|g if /$otel_spec_event_deprecation/; |
200 |
| - } |
201 |
| - |
202 | 187 | s|(\]\()/docs/|$1$specBasePath/semconv/|g;
|
203 | 188 | s|(\]:\s*)/docs/|$1$specBasePath/semconv/|;
|
204 | 189 |
|
205 | 190 | s|\((/model/.*?)\)|($semconvSpecRepoUrl/tree/v$semconvVers/$1)|g;
|
206 | 191 | }
|
207 | 192 |
|
208 |
| - |
209 | 193 | # SPECIFICATION custom processing
|
210 | 194 |
|
211 |
| - if ($ARGV =~ /^tmp\/otel\/specification/ && applyPatchOrPrintMsgIf('2025-01-22-attribute-naming.md', 'semconv', '1.29.0')) { |
212 |
| - my $semconv_attr_naming_md = '(semantic-conventions/blob/main/docs/general)/naming.md(#\w+)?'; |
213 |
| - s|$semconv_attr_naming_md\b|$1/attribute-naming.md|g if /$semconv_attr_naming_md/; |
214 |
| - } |
215 |
| - |
216 |
| - patchAttrNaming(); # TEMPORARY patch |
217 |
| - |
218 | 195 | s|\(https://github.com/open-telemetry/opentelemetry-specification\)|($specBasePath/otel/)|;
|
219 | 196 | s|(\]\()/specification/|$1$specBasePath/otel/)|;
|
220 | 197 | s|\.\./specification/(.*?\))|../otel/$1|g if $ARGV =~ /otel\/specification/;
|
|
254 | 231 |
|
255 | 232 | s|\]\((proto/opamp.proto)\)|]($opAmpSpecRepoUrl/blob/main/$1)|;
|
256 | 233 |
|
| 234 | + patchSemConvEmitAnEvent(); |
| 235 | + |
257 | 236 | print;
|
258 | 237 | }
|
0 commit comments