diff --git a/pkg/ottl/contexts/ottlspanevent/span_events.go b/pkg/ottl/contexts/ottlspanevent/span_events.go index 69fea44c6968..a9f41b1c60ea 100644 --- a/pkg/ottl/contexts/ottlspanevent/span_events.go +++ b/pkg/ottl/contexts/ottlspanevent/span_events.go @@ -357,7 +357,7 @@ func accessSpanEventIndex() ottl.StandardGetSetter[TransformContext] { return tCtx.eventIndex, nil }, Setter: func(_ context.Context, _ TransformContext, _ any) error { - return nil + return errors.New("the 'event_index' path cannot be modified") }, } }