Skip to content

Commit 8a7e2c7

Browse files
authored
[pkg/ottl] Remove ottl<context>.Option (#38247)
I found while working on #38239 that these options are difficult to work with in a generic way and are really just aliases for `ottl.Option` anyways.
1 parent cc8e647 commit 8a7e2c7

File tree

14 files changed

+72
-58
lines changed

14 files changed

+72
-58
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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. filelogreceiver)
7+
component: pkg/ottl
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Remove ottl<context>.Option in favor of ottl.Option[ottl<context>.TransformContext]
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [38247]
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+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: [api]

internal/filter/filterottl/filter.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func NewBoolExprForSpan(conditions []string, functions map[string]ottl.Factory[o
2424
}
2525

2626
// NewBoolExprForSpanWithOptions is like NewBoolExprForSpan, but with additional options.
27-
func NewBoolExprForSpanWithOptions(conditions []string, functions map[string]ottl.Factory[ottlspan.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottlspan.Option) (*ottl.ConditionSequence[ottlspan.TransformContext], error) {
27+
func NewBoolExprForSpanWithOptions(conditions []string, functions map[string]ottl.Factory[ottlspan.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottl.Option[ottlspan.TransformContext]) (*ottl.ConditionSequence[ottlspan.TransformContext], error) {
2828
parser, err := ottlspan.NewParser(functions, set, parserOptions...)
2929
if err != nil {
3030
return nil, err
@@ -45,7 +45,7 @@ func NewBoolExprForSpanEvent(conditions []string, functions map[string]ottl.Fact
4545
}
4646

4747
// NewBoolExprForSpanEventWithOptions is like NewBoolExprForSpanEvent, but with additional options.
48-
func NewBoolExprForSpanEventWithOptions(conditions []string, functions map[string]ottl.Factory[ottlspanevent.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottlspanevent.Option) (*ottl.ConditionSequence[ottlspanevent.TransformContext], error) {
48+
func NewBoolExprForSpanEventWithOptions(conditions []string, functions map[string]ottl.Factory[ottlspanevent.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottl.Option[ottlspanevent.TransformContext]) (*ottl.ConditionSequence[ottlspanevent.TransformContext], error) {
4949
parser, err := ottlspanevent.NewParser(functions, set, parserOptions...)
5050
if err != nil {
5151
return nil, err
@@ -66,7 +66,7 @@ func NewBoolExprForMetric(conditions []string, functions map[string]ottl.Factory
6666
}
6767

6868
// NewBoolExprForMetricWithOptions is like NewBoolExprForMetric, but with additional options.
69-
func NewBoolExprForMetricWithOptions(conditions []string, functions map[string]ottl.Factory[ottlmetric.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottlmetric.Option) (*ottl.ConditionSequence[ottlmetric.TransformContext], error) {
69+
func NewBoolExprForMetricWithOptions(conditions []string, functions map[string]ottl.Factory[ottlmetric.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottl.Option[ottlmetric.TransformContext]) (*ottl.ConditionSequence[ottlmetric.TransformContext], error) {
7070
parser, err := ottlmetric.NewParser(functions, set, parserOptions...)
7171
if err != nil {
7272
return nil, err
@@ -87,7 +87,7 @@ func NewBoolExprForDataPoint(conditions []string, functions map[string]ottl.Fact
8787
}
8888

8989
// NewBoolExprForDataPointWithOptions is like NewBoolExprForDataPoint, but with additional options.
90-
func NewBoolExprForDataPointWithOptions(conditions []string, functions map[string]ottl.Factory[ottldatapoint.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottldatapoint.Option) (*ottl.ConditionSequence[ottldatapoint.TransformContext], error) {
90+
func NewBoolExprForDataPointWithOptions(conditions []string, functions map[string]ottl.Factory[ottldatapoint.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottl.Option[ottldatapoint.TransformContext]) (*ottl.ConditionSequence[ottldatapoint.TransformContext], error) {
9191
parser, err := ottldatapoint.NewParser(functions, set, parserOptions...)
9292
if err != nil {
9393
return nil, err
@@ -108,7 +108,7 @@ func NewBoolExprForLog(conditions []string, functions map[string]ottl.Factory[ot
108108
}
109109

110110
// NewBoolExprForLogWithOptions is like NewBoolExprForLog, but with additional options.
111-
func NewBoolExprForLogWithOptions(conditions []string, functions map[string]ottl.Factory[ottllog.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottllog.Option) (*ottl.ConditionSequence[ottllog.TransformContext], error) {
111+
func NewBoolExprForLogWithOptions(conditions []string, functions map[string]ottl.Factory[ottllog.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottl.Option[ottllog.TransformContext]) (*ottl.ConditionSequence[ottllog.TransformContext], error) {
112112
parser, err := ottllog.NewParser(functions, set, parserOptions...)
113113
if err != nil {
114114
return nil, err
@@ -129,7 +129,7 @@ func NewBoolExprForResource(conditions []string, functions map[string]ottl.Facto
129129
}
130130

131131
// NewBoolExprForResourceWithOptions is like NewBoolExprForResource, but with additional options.
132-
func NewBoolExprForResourceWithOptions(conditions []string, functions map[string]ottl.Factory[ottlresource.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottlresource.Option) (*ottl.ConditionSequence[ottlresource.TransformContext], error) {
132+
func NewBoolExprForResourceWithOptions(conditions []string, functions map[string]ottl.Factory[ottlresource.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottl.Option[ottlresource.TransformContext]) (*ottl.ConditionSequence[ottlresource.TransformContext], error) {
133133
parser, err := ottlresource.NewParser(functions, set, parserOptions...)
134134
if err != nil {
135135
return nil, err
@@ -150,7 +150,7 @@ func NewBoolExprForScope(conditions []string, functions map[string]ottl.Factory[
150150
}
151151

152152
// NewBoolExprForScopeWithOptions is like NewBoolExprForScope, but with additional options.
153-
func NewBoolExprForScopeWithOptions(conditions []string, functions map[string]ottl.Factory[ottlscope.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottlscope.Option) (*ottl.ConditionSequence[ottlscope.TransformContext], error) {
153+
func NewBoolExprForScopeWithOptions(conditions []string, functions map[string]ottl.Factory[ottlscope.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings, parserOptions []ottl.Option[ottlscope.TransformContext]) (*ottl.ConditionSequence[ottlscope.TransformContext], error) {
154154
parser, err := ottlscope.NewParser(functions, set, parserOptions...)
155155
if err != nil {
156156
return nil, err

internal/filter/filterottl/filter_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func Test_NewBoolExprForSpanWithOptions(t *testing.T) {
6868
StandardSpanFuncs(),
6969
ottl.PropagateError,
7070
componenttest.NewNopTelemetrySettings(),
71-
[]ottlspan.Option{ottlspan.EnablePathContextNames()},
71+
[]ottl.Option[ottlspan.TransformContext]{ottlspan.EnablePathContextNames()},
7272
)
7373
assert.NoError(t, err)
7474
}
@@ -121,7 +121,7 @@ func Test_NewBoolExprForSpanEventWithOptions(t *testing.T) {
121121
StandardSpanEventFuncs(),
122122
ottl.PropagateError,
123123
componenttest.NewNopTelemetrySettings(),
124-
[]ottlspanevent.Option{ottlspanevent.EnablePathContextNames()},
124+
[]ottl.Option[ottlspanevent.TransformContext]{ottlspanevent.EnablePathContextNames()},
125125
)
126126
assert.NoError(t, err)
127127
}
@@ -174,7 +174,7 @@ func Test_NewBoolExprForMetricWithOptions(t *testing.T) {
174174
StandardMetricFuncs(),
175175
ottl.PropagateError,
176176
componenttest.NewNopTelemetrySettings(),
177-
[]ottlmetric.Option{ottlmetric.EnablePathContextNames()},
177+
[]ottl.Option[ottlmetric.TransformContext]{ottlmetric.EnablePathContextNames()},
178178
)
179179
assert.NoError(t, err)
180180
}
@@ -227,7 +227,7 @@ func Test_NewBoolExprForDataPointWithOptions(t *testing.T) {
227227
StandardDataPointFuncs(),
228228
ottl.PropagateError,
229229
componenttest.NewNopTelemetrySettings(),
230-
[]ottldatapoint.Option{ottldatapoint.EnablePathContextNames()},
230+
[]ottl.Option[ottldatapoint.TransformContext]{ottldatapoint.EnablePathContextNames()},
231231
)
232232
assert.NoError(t, err)
233233
}
@@ -280,7 +280,7 @@ func Test_NewBoolExprForLogWithOptions(t *testing.T) {
280280
StandardLogFuncs(),
281281
ottl.PropagateError,
282282
componenttest.NewNopTelemetrySettings(),
283-
[]ottllog.Option{ottllog.EnablePathContextNames()},
283+
[]ottl.Option[ottllog.TransformContext]{ottllog.EnablePathContextNames()},
284284
)
285285
assert.NoError(t, err)
286286
}
@@ -333,7 +333,7 @@ func Test_NewBoolExprForResourceWithOptions(t *testing.T) {
333333
StandardResourceFuncs(),
334334
ottl.PropagateError,
335335
componenttest.NewNopTelemetrySettings(),
336-
[]ottlresource.Option{ottlresource.EnablePathContextNames()},
336+
[]ottl.Option[ottlresource.TransformContext]{ottlresource.EnablePathContextNames()},
337337
)
338338
assert.NoError(t, err)
339339
}
@@ -394,7 +394,7 @@ func Test_NewBoolExprForScopeWithOptions(t *testing.T) {
394394
StandardScopeFuncs(),
395395
ottl.PropagateError,
396396
componenttest.NewNopTelemetrySettings(),
397-
[]ottlscope.Option{ottlscope.EnablePathContextNames()},
397+
[]ottl.Option[ottlscope.TransformContext]{ottlscope.EnablePathContextNames()},
398398
)
399399
assert.NoError(t, err)
400400
}

pkg/ottl/contexts/ottldatapoint/datapoint.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ func (tCtx TransformContext) MarshalLogObject(encoder zapcore.ObjectEncoder) err
6464
return err
6565
}
6666

67-
type Option func(*ottl.Parser[TransformContext])
68-
6967
type TransformContextOption func(*TransformContext)
7068

7169
func NewTransformContext(dataPoint any, metric pmetric.Metric, metrics pmetric.MetricSlice, instrumentationScope pcommon.InstrumentationScope, resource pcommon.Resource, scopeMetrics pmetric.ScopeMetrics, resourceMetrics pmetric.ResourceMetrics, options ...TransformContextOption) TransformContext {
@@ -131,7 +129,7 @@ type pathExpressionParser struct {
131129
cacheGetSetter ottl.PathExpressionParser[TransformContext]
132130
}
133131

134-
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) {
132+
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...ottl.Option[TransformContext]) (ottl.Parser[TransformContext], error) {
135133
pep := pathExpressionParser{
136134
telemetrySettings: telemetrySettings,
137135
cacheGetSetter: ctxcache.PathExpressionParser(getCache),
@@ -156,7 +154,7 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet
156154
// otherwise an error is reported.
157155
//
158156
// Experimental: *NOTE* this option is subject to change or removal in the future.
159-
func EnablePathContextNames() Option {
157+
func EnablePathContextNames() ottl.Option[TransformContext] {
160158
return func(p *ottl.Parser[TransformContext]) {
161159
ottl.WithPathContextNames[TransformContext]([]string{
162160
ctxdatapoint.Name,

pkg/ottl/contexts/ottllog/log.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ func (tCtx TransformContext) MarshalLogObject(encoder zapcore.ObjectEncoder) err
6868
return err
6969
}
7070

71-
type Option func(*ottl.Parser[TransformContext])
72-
7371
type TransformContextOption func(*TransformContext)
7472

7573
func NewTransformContext(logRecord plog.LogRecord, instrumentationScope pcommon.InstrumentationScope, resource pcommon.Resource, scopeLogs plog.ScopeLogs, resourceLogs plog.ResourceLogs, options ...TransformContextOption) TransformContext {
@@ -125,7 +123,7 @@ type pathExpressionParser struct {
125123
cacheGetSetter ottl.PathExpressionParser[TransformContext]
126124
}
127125

128-
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) {
126+
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...ottl.Option[TransformContext]) (ottl.Parser[TransformContext], error) {
129127
pep := pathExpressionParser{
130128
telemetrySettings: telemetrySettings,
131129
cacheGetSetter: ctxcache.PathExpressionParser(getCache),
@@ -150,7 +148,7 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet
150148
// otherwise an error is reported.
151149
//
152150
// Experimental: *NOTE* this option is subject to change or removal in the future.
153-
func EnablePathContextNames() Option {
151+
func EnablePathContextNames() ottl.Option[TransformContext] {
154152
return func(p *ottl.Parser[TransformContext]) {
155153
ottl.WithPathContextNames[TransformContext]([]string{
156154
ctxlog.Name,

pkg/ottl/contexts/ottlmetric/metrics.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ type TransformContext struct {
3838
resourceMetrics pmetric.ResourceMetrics
3939
}
4040

41-
type Option func(*ottl.Parser[TransformContext])
42-
4341
type TransformContextOption func(*TransformContext)
4442

4543
func NewTransformContext(metric pmetric.Metric, metrics pmetric.MetricSlice, instrumentationScope pcommon.InstrumentationScope, resource pcommon.Resource, scopeMetrics pmetric.ScopeMetrics, resourceMetrics pmetric.ResourceMetrics, options ...TransformContextOption) TransformContext {
@@ -100,7 +98,7 @@ type pathExpressionParser struct {
10098
cacheGetSetter ottl.PathExpressionParser[TransformContext]
10199
}
102100

103-
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) {
101+
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...ottl.Option[TransformContext]) (ottl.Parser[TransformContext], error) {
104102
pep := pathExpressionParser{
105103
telemetrySettings: telemetrySettings,
106104
cacheGetSetter: ctxcache.PathExpressionParser(getCache),
@@ -125,7 +123,7 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet
125123
// otherwise an error is reported.
126124
//
127125
// Experimental: *NOTE* this option is subject to change or removal in the future.
128-
func EnablePathContextNames() Option {
126+
func EnablePathContextNames() ottl.Option[TransformContext] {
129127
return func(p *ottl.Parser[TransformContext]) {
130128
ottl.WithPathContextNames[TransformContext]([]string{
131129
ctxmetric.Name,

pkg/ottl/contexts/ottlresource/resource.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ func (tCtx TransformContext) MarshalLogObject(encoder zapcore.ObjectEncoder) err
3939
return err
4040
}
4141

42-
type Option func(*ottl.Parser[TransformContext])
43-
4442
type TransformContextOption func(*TransformContext)
4543

4644
func NewTransformContext(resource pcommon.Resource, schemaURLItem ctxcommon.SchemaURLItem, options ...TransformContextOption) TransformContext {
@@ -81,7 +79,7 @@ type pathExpressionParser struct {
8179
cacheGetSetter ottl.PathExpressionParser[TransformContext]
8280
}
8381

84-
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) {
82+
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...ottl.Option[TransformContext]) (ottl.Parser[TransformContext], error) {
8583
pep := pathExpressionParser{
8684
telemetrySettings: telemetrySettings,
8785
cacheGetSetter: ctxcache.PathExpressionParser[TransformContext](getCache),
@@ -106,7 +104,7 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet
106104
// otherwise an error is reported.
107105
//
108106
// Experimental: *NOTE* this option is subject to change or removal in the future.
109-
func EnablePathContextNames() Option {
107+
func EnablePathContextNames() ottl.Option[TransformContext] {
110108
return func(p *ottl.Parser[TransformContext]) {
111109
ottl.WithPathContextNames[TransformContext]([]string{ContextName})(p)
112110
}

pkg/ottl/contexts/ottlscope/scope.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ func (tCtx TransformContext) MarshalLogObject(encoder zapcore.ObjectEncoder) err
4343
return err
4444
}
4545

46-
type Option func(*ottl.Parser[TransformContext])
47-
4846
type TransformContextOption func(*TransformContext)
4947

5048
func NewTransformContext(instrumentationScope pcommon.InstrumentationScope, resource pcommon.Resource, schemaURLItem ctxcommon.SchemaURLItem, options ...TransformContextOption) TransformContext {
@@ -85,20 +83,21 @@ func (tCtx TransformContext) GetResourceSchemaURLItem() ctxcommon.SchemaURLItem
8583
return tCtx.schemaURLItem
8684
}
8785

86+
func getCache(tCtx TransformContext) pcommon.Map {
87+
return tCtx.cache
88+
}
89+
8890
type pathExpressionParser struct {
8991
telemetrySettings component.TelemetrySettings
9092
cacheGetSetter ottl.PathExpressionParser[TransformContext]
9193
}
9294

93-
func getCache(tCtx TransformContext) pcommon.Map {
94-
return tCtx.cache
95-
}
96-
97-
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) {
95+
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...ottl.Option[TransformContext]) (ottl.Parser[TransformContext], error) {
9896
pep := pathExpressionParser{
9997
telemetrySettings: telemetrySettings,
10098
cacheGetSetter: ctxcache.PathExpressionParser[TransformContext](getCache),
10199
}
100+
102101
p, err := ottl.NewParser[TransformContext](
103102
functions,
104103
pep.parsePath,
@@ -119,7 +118,7 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet
119118
// otherwise an error is reported.
120119
//
121120
// Experimental: *NOTE* this option is subject to change or removal in the future.
122-
func EnablePathContextNames() Option {
121+
func EnablePathContextNames() ottl.Option[TransformContext] {
123122
return func(p *ottl.Parser[TransformContext]) {
124123
ottl.WithPathContextNames[TransformContext]([]string{
125124
ContextName,

pkg/ottl/contexts/ottlspan/span.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ func (tCtx TransformContext) MarshalLogObject(encoder zapcore.ObjectEncoder) err
4949
return err
5050
}
5151

52-
type Option func(*ottl.Parser[TransformContext])
53-
5452
type TransformContextOption func(*TransformContext)
5553

5654
func NewTransformContext(span ptrace.Span, instrumentationScope pcommon.InstrumentationScope, resource pcommon.Resource, scopeSpans ptrace.ScopeSpans, resourceSpans ptrace.ResourceSpans, options ...TransformContextOption) TransformContext {
@@ -101,7 +99,12 @@ func getCache(tCtx TransformContext) pcommon.Map {
10199
return tCtx.cache
102100
}
103101

104-
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...Option) (ottl.Parser[TransformContext], error) {
102+
type pathExpressionParser struct {
103+
telemetrySettings component.TelemetrySettings
104+
cacheGetSetter ottl.PathExpressionParser[TransformContext]
105+
}
106+
107+
func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySettings component.TelemetrySettings, options ...ottl.Option[TransformContext]) (ottl.Parser[TransformContext], error) {
105108
pep := pathExpressionParser{
106109
telemetrySettings: telemetrySettings,
107110
cacheGetSetter: ctxcache.PathExpressionParser[TransformContext](getCache),
@@ -126,7 +129,7 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet
126129
// otherwise an error is reported.
127130
//
128131
// Experimental: *NOTE* this option is subject to change or removal in the future.
129-
func EnablePathContextNames() Option {
132+
func EnablePathContextNames() ottl.Option[TransformContext] {
130133
return func(p *ottl.Parser[TransformContext]) {
131134
ottl.WithPathContextNames[TransformContext]([]string{
132135
ctxspan.Name,
@@ -178,11 +181,6 @@ func parseEnum(val *ottl.EnumSymbol) (*ottl.Enum, error) {
178181
return nil, fmt.Errorf("enum symbol not provided")
179182
}
180183

181-
type pathExpressionParser struct {
182-
telemetrySettings component.TelemetrySettings
183-
cacheGetSetter ottl.PathExpressionParser[TransformContext]
184-
}
185-
186184
func (pep *pathExpressionParser) parsePath(path ottl.Path[TransformContext]) (ottl.GetSetter[TransformContext], error) {
187185
if path == nil {
188186
return nil, ctxerror.New("nil", "nil", ctxspan.Name, ctxspan.DocRef)

0 commit comments

Comments
 (0)