This topic has been covered many, many times. A Shimano chain can be measured with a precision scale for elongation. If the center to center distance between 24 pins reaches 12-1/16", it has elongated by .5% and should be changed. Unfortunately, that alone does not guarantee that a new chain will not skip on one or more of the most used cogs. With 4,000 miles on the chain, it may already be too late and you may need a new cassette to go with that new chain.