Skip to content

Commit ef2188d

Browse files
authored
Merge branch 'main' into codeboten/mark-semconv-deprecated
2 parents 20f9c14 + ee2c784 commit ef2188d

File tree

168 files changed

+1999
-543
lines changed

Some content is hidden

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

168 files changed

+1999
-543
lines changed

.chloggen/mdatagen-events-doc.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: cmd/mdatagen
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Add events in generated documentation
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [12571]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# Optional: The change log or logs in which this entry should be included.
21+
# e.g. '[user]' or '[user, api]'
22+
# Include 'user' if the change is relevant to end users.
23+
# Include 'api' if there is a change to a library API.
24+
# Default: '[user]'
25+
change_logs: [api]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: breaking
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: otlpreceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Use wrapper type for URL paths
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [13046]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# Optional: The change log or logs in which this entry should be included.
21+
# e.g. '[user]' or '[user, api]'
22+
# Include 'user' if the change is relevant to end users.
23+
# Include 'api' if there is a change to a library API.
24+
# Default: '[user]'
25+
change_logs: [api]

.chloggen/pipeline-throughput.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: service
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Add size metrics defined in Pipeline Component Telemetry RFC
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [13032]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: |
19+
See [Pipeline Component Telemetry RFC](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/rfcs/component-universal-telemetry.md) for more details:
20+
- `otelcol.receiver.produced.size`
21+
- `otelcol.processor.consumed.size`
22+
- `otelcol.processor.produced.size`
23+
- `otelcol.connector.consumed.size`
24+
- `otelcol.connector.produced.size`
25+
- `otelcol.exporter.consumed.size`
26+
27+
# Optional: The change log or logs in which this entry should be included.
28+
# e.g. '[user]' or '[user, api]'
29+
# Include 'user' if the change is relevant to end users.
30+
# Include 'api' if there is a change to a library API.
31+
# Default: '[user]'
32+
change_logs: []

client/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ require (
2121
golang.org/x/sys v0.32.0 // indirect
2222
golang.org/x/text v0.24.0 // indirect
2323
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
24-
google.golang.org/grpc v1.72.0 // indirect
24+
google.golang.org/grpc v1.72.1 // indirect
2525
google.golang.org/protobuf v1.36.6 // indirect
2626
gopkg.in/yaml.v3 v3.0.1 // indirect
2727
)

client/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/mdatagen/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ require (
7272
golang.org/x/net v0.39.0 // indirect
7373
golang.org/x/sys v0.32.0 // indirect
7474
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
75-
google.golang.org/grpc v1.72.0 // indirect
75+
google.golang.org/grpc v1.72.1 // indirect
7676
google.golang.org/protobuf v1.36.6 // indirect
7777
gopkg.in/yaml.v3 v3.0.1 // indirect
7878
sigs.k8s.io/yaml v1.4.0 // indirect

cmd/mdatagen/go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/mdatagen/internal/command.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ func run(ymlPath string) error {
158158
}
159159
}
160160

161-
if len(md.Metrics) != 0 || len(md.Telemetry.Metrics) != 0 || len(md.ResourceAttributes) != 0 { // if there's metrics or internal metrics, generate documentation for them
161+
if len(md.Metrics) != 0 || len(md.Telemetry.Metrics) != 0 || len(md.ResourceAttributes) != 0 || len(md.Events) != 0 { // if there's metrics or internal metrics or events, generate documentation for them
162162
toGenerate[filepath.Join(tmplDir, "documentation.md.tmpl")] = filepath.Join(ymlDir, "documentation.md")
163163
}
164164

@@ -220,6 +220,9 @@ func templatize(tmplFile string, md Metadata) *template.Template {
220220
"metricInfo": func(mn MetricName) Metric {
221221
return md.Metrics[mn]
222222
},
223+
"eventInfo": func(en EventName) Event {
224+
return md.Events[en]
225+
},
223226
"telemetryInfo": func(mn MetricName) Metric {
224227
return md.Telemetry.Metrics[mn]
225228
},

cmd/mdatagen/internal/command_test.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ func TestNewCommand(t *testing.T) {
3131

3232
func TestRunContents(t *testing.T) {
3333
tests := []struct {
34-
yml string
35-
wantMetricsGenerated bool
34+
yml string
35+
wantMetricsGenerated bool
36+
// TODO: we should add one more flag for logs builder
37+
wantEventsGenerated bool
3638
wantMetricsContext bool
3739
wantConfigGenerated bool
3840
wantTelemetryGenerated bool
@@ -179,6 +181,14 @@ func TestRunContents(t *testing.T) {
179181
wantReadmeGenerated: true,
180182
wantComponentTestGenerated: true,
181183
},
184+
{
185+
yml: "events/basic_event.yaml",
186+
wantStatusGenerated: true,
187+
wantReadmeGenerated: true,
188+
wantComponentTestGenerated: true,
189+
wantConfigGenerated: true,
190+
wantEventsGenerated: true,
191+
},
182192
}
183193
for _, tt := range tests {
184194
t.Run(tt.yml, func(t *testing.T) {
@@ -255,7 +265,7 @@ foo
255265
require.NoFileExists(t, filepath.Join(tmpdir, generatedPackageDir, "generated_telemetry.go"))
256266
}
257267

258-
if !tt.wantMetricsGenerated && !tt.wantTelemetryGenerated && !tt.wantResourceAttributesGenerated {
268+
if !tt.wantMetricsGenerated && !tt.wantTelemetryGenerated && !tt.wantResourceAttributesGenerated && !tt.wantEventsGenerated {
259269
require.NoFileExists(t, filepath.Join(tmpdir, "documentation.md"))
260270
}
261271

cmd/mdatagen/internal/samplereceiver/documentation.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,46 @@ metrics:
101101
| string_attr | Attribute with any string value. | Any Str |
102102
| boolean_attr | Attribute with a boolean value. | Any Bool |
103103
104+
## Default Events
105+
106+
The following events are emitted by default. Each of them can be disabled by applying the following configuration:
107+
108+
```yaml
109+
events:
110+
<event_name>:
111+
enabled: false
112+
```
113+
114+
### default.event
115+
116+
Example event enabled by default.
117+
118+
#### Attributes
119+
120+
| Name | Description | Values |
121+
| ---- | ----------- | ------ |
122+
| string_attr | Attribute with any string value. | Any Str |
123+
| state | Integer attribute with overridden name. | Any Int |
124+
| enum_attr | Attribute with a known set of string values. | Str: ``red``, ``green``, ``blue`` |
125+
| slice_attr | Attribute with a slice value. | Any Slice |
126+
| map_attr | Attribute with a map value. | Any Map |
127+
128+
### default.event.to_be_removed
129+
130+
[DEPRECATED] Example to-be-removed event enabled by default.
131+
132+
The event will be will be removed soon.
133+
134+
#### Attributes
135+
136+
| Name | Description | Values |
137+
| ---- | ----------- | ------ |
138+
| string_attr | Attribute with any string value. | Any Str |
139+
| state | Integer attribute with overridden name. | Any Int |
140+
| enum_attr | Attribute with a known set of string values. | Str: ``red``, ``green``, ``blue`` |
141+
| slice_attr | Attribute with a slice value. | Any Slice |
142+
| map_attr | Attribute with a map value. | Any Map |
143+
104144
## Resource Attributes
105145
106146
| Name | Description | Values | Enabled |

0 commit comments

Comments
 (0)