Skip to content

Commit fbd3281

Browse files
committed
Add retry dropped item metrics and an exhausted retry error marker for exporter helper retries
Signed-off-by: Israel Blancas <[email protected]>
1 parent c08dbf5 commit fbd3281

File tree

100 files changed

+343
-622
lines changed

Some content is hidden

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

100 files changed

+343
-622
lines changed

.chloggen/mdatagen_add_semconv_ref.yaml renamed to .chloggen/13956.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
change_type: enhancement
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: cmd/mdatagen
7+
component: pkg/exporterhelper
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10-
note: Add semconv reference for metrics
10+
note: Add retry dropped item metrics and an exhausted retry error marker for exporter helper retries.
1111

1212
# One or more tracking issues or pull requests related to the change
13-
issues: [13920]
13+
issues: [13956]
1414

1515
# (Optional) One or more lines of additional information to render under the primary note.
1616
# These lines will be padded with 2 spaces and then inserted directly into the document.
1717
# Use pipe (|) for multiline entries.
18-
subtext:
18+
subtext: |-
19+
New counters `otelcol_exporter_retry_dropped_{spans,metric_points,log_records}` capture items discarded after exhausting retries while `IsRetriesExhaustedErr` detects the terminal retry outcome.
1920
2021
# Optional: The change log or logs in which this entry should be included.
2122
# e.g. '[user]' or '[user, api]'

.chloggen/mx-psi_mark-configoptional-gate-as-beta.yaml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.chloggen/otelcol-factoriestelemetry-required.yaml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
- name: Setup Go
9494
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
9595
with:
96-
go-version: stable
96+
go-version: oldstable
9797
cache: false
9898
- name: Cache Go
9999
id: go-cache

.github/workflows/utils/cspell.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"CHACHA",
1717
"CODEOWNERS",
1818
"Chao",
19-
"Chrs",
2019
"Confmap",
2120
"DOLLARSIGN",
2221
"Distro",
@@ -168,7 +167,6 @@
168167
"coreinternal",
169168
"cpus",
170169
"cpuscraper",
171-
"crobert",
172170
"crosslink",
173171
"cumulativetodeltaprocessor",
174172
"customname",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ For more information about the maintainer role, see the [community repository](h
172172

173173
### Approvers
174174

175-
- [Andrew Wilkins](https://github.com/axw), Elastic
176175
- [Antoine Toulme](https://github.com/atoulme), Splunk
177176
- [Damien Mathieu](https://github.com/dmathieu), Elastic
178177
- [Evan Bradley](https://github.com/evan-bradley), Dynatrace
@@ -188,6 +187,7 @@ the role of the [release manager](./docs/release.md#release-manager).
188187

189188
### Triagers
190189

190+
- [Andrew Wilkins](https://github.com/axw), Elastic
191191
- [Andrzej Stencel](https://github.com/andrzej-stencel), Elastic
192192
- [Chao Weng](https://github.com/sincejune), AppDynamics
193193
- [Vihas Makwana](https://github.com/VihasMakwana), Elastic

cmd/builder/internal/builder/main_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ var replaceModules = []string{
9292
"/internal/fanoutconsumer",
9393
"/internal/sharedcomponent",
9494
"/internal/telemetry",
95-
"/internal/testutil",
9695
"/otelcol",
9796
"/pdata",
9897
"/pdata/testdata",

cmd/mdatagen/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,12 @@ replace go.opentelemetry.io/collector/config/configtelemetry => ../../config/con
190190

191191
replace go.opentelemetry.io/collector/config/confighttp => ../../config/confighttp
192192

193+
replace go.opentelemetry.io/collector => ../..
194+
193195
replace go.opentelemetry.io/collector/extension/extensioncapabilities => ../../extension/extensioncapabilities
194196

195197
replace go.opentelemetry.io/collector/pdata/xpdata => ../../pdata/xpdata
196198

197199
replace go.opentelemetry.io/collector/exporter/exporterhelper => ../../exporter/exporterhelper
198200

199201
replace go.opentelemetry.io/collector/service/telemetry/telemetrytest => ../../service/telemetry/telemetrytest
200-
201-
replace go.opentelemetry.io/collector/internal/testutil => ../../internal/testutil

cmd/mdatagen/internal/loader_test.go

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func TestLoadMetadata(t *testing.T) {
4747
GithubProject: "open-telemetry/opentelemetry-collector",
4848
GeneratedPackageName: "metadata",
4949
Type: "sample",
50-
SemConvVersion: "1.37.0",
50+
SemConvVersion: "1.9.0",
5151
PackageName: "go.opentelemetry.io/collector/cmd/mdatagen/internal/samplereceiver",
5252
Status: &Status{
5353
DisableCodeCov: true,
@@ -261,21 +261,6 @@ func TestLoadMetadata(t *testing.T) {
261261
Mono: Mono{Monotonic: true},
262262
},
263263
},
264-
"system.cpu.time": {
265-
Signal: Signal{
266-
Enabled: true,
267-
Stability: Stability{Level: component.StabilityLevelBeta},
268-
SemanticConvention: &SemanticConvention{SemanticConventionRef: "https://github.com/open-telemetry/semantic-conventions/blob/v1.37.0/docs/system/system-metrics.md#metric-systemcputime"},
269-
Description: "Monotonic cumulative sum int metric enabled by default.",
270-
ExtendedDocumentation: "The metric will be become optional soon.",
271-
},
272-
Unit: strPtr("s"),
273-
Sum: &Sum{
274-
MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeInt},
275-
AggregationTemporality: AggregationTemporality{Aggregation: pmetric.AggregationTemporalityCumulative},
276-
Mono: Mono{Monotonic: true},
277-
},
278-
},
279264
"optional.metric": {
280265
Signal: Signal{
281266
Enabled: false,
@@ -539,11 +524,6 @@ func TestLoadMetadata(t *testing.T) {
539524
want: Metadata{},
540525
wantErr: "decoding failed due to the following error(s):\n\n'metrics[default.metric]' decoding failed due to the following error(s):\n\n'stability' decoding failed due to the following error(s):\n\n'level' unsupported stability level: \"development42\"",
541526
},
542-
{
543-
name: "testdata/invalid_metric_semconvref.yaml",
544-
want: Metadata{},
545-
wantErr: "metric \"default.metric\": invalid semantic-conventions URL: want https://github.com/open-telemetry/semantic-conventions/blob/v1.37.2/*#metric-defaultmetric, got \"https://github.com/open-telemetry/semantic-conventions/blob/v1.38.0/docs/system/system-metrics.md#metric-systemcputime\"",
546-
},
547527
{
548528
name: "testdata/no_metric_stability.yaml",
549529
want: Metadata{},

cmd/mdatagen/internal/metadata.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@ func (md *Metadata) validateMetricsAndEvents() error {
181181
var errs error
182182
usedAttrs := map[AttributeName]bool{}
183183
errs = errors.Join(errs,
184-
validateMetrics(md.Metrics, md.Attributes, usedAttrs, md.SemConvVersion),
185-
validateMetrics(md.Telemetry.Metrics, md.Attributes, usedAttrs, md.SemConvVersion),
184+
validateMetrics(md.Metrics, md.Attributes, usedAttrs),
185+
validateMetrics(md.Telemetry.Metrics, md.Attributes, usedAttrs),
186186
validateEvents(md.Events, md.Attributes, usedAttrs),
187187
md.validateAttributes(usedAttrs))
188188
return errs
@@ -226,10 +226,10 @@ func (md *Metadata) supportsSignal(signal string) bool {
226226
return false
227227
}
228228

229-
func validateMetrics(metrics map[MetricName]Metric, attributes map[AttributeName]Attribute, usedAttrs map[AttributeName]bool, semConvVersion string) error {
229+
func validateMetrics(metrics map[MetricName]Metric, attributes map[AttributeName]Attribute, usedAttrs map[AttributeName]bool) error {
230230
var errs error
231231
for mn, m := range metrics {
232-
if err := m.validate(mn, semConvVersion); err != nil {
232+
if err := m.validate(); err != nil {
233233
errs = errors.Join(errs, fmt.Errorf(`metric "%v": %w`, mn, err))
234234
continue
235235
}
@@ -367,10 +367,6 @@ func (mvt ValueType) Primitive() string {
367367
}
368368
}
369369

370-
type SemanticConvention struct {
371-
SemanticConventionRef string `mapstructure:"ref"`
372-
}
373-
374370
type Warnings struct {
375371
// A warning that will be displayed if the field is enabled in user config.
376372
IfEnabled string `mapstructure:"if_enabled"`
@@ -482,9 +478,6 @@ type Signal struct {
482478
// Description of the signal.
483479
Description string `mapstructure:"description"`
484480

485-
// The semantic convention reference of the signal.
486-
SemanticConvention *SemanticConvention `mapstructure:"semantic_convention"`
487-
488481
// The stability level of the signal.
489482
Stability Stability `mapstructure:"stability"`
490483

0 commit comments

Comments
 (0)