Annotate AutoValue classes as Immutable (#3875)

* annotate AutoValue classes as Immutable

* Remove @Immutable on internal classes

Co-authored-by: jack-berg <jberg@newrelic.com>
This commit is contained in:
Eugene R 2022-01-14 22:53:14 +02:00 committed by GitHub
parent c887f2c51a
commit 3518c98c45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -9,12 +9,14 @@ import com.google.auto.value.AutoValue;
import io.opentelemetry.sdk.OpenTelemetrySdk;
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;
import io.opentelemetry.sdk.resources.Resource;
import javax.annotation.concurrent.Immutable;
/**
* An auto-configured OpenTelemetry SDK. As an alternative to programmatically configuring the SDK
* using {@link OpenTelemetrySdk#builder()}, this package can be used to automatically configure the
* SDK using environment properties specified by OpenTelemetry.
*/
@Immutable
@AutoValue
public abstract class AutoConfiguredOpenTelemetrySdk {

View File

@ -20,7 +20,7 @@ abstract class ExponentialHistogramAccumulation {
* @param scale the scale of the exponential histogram.
* @param sum the sum of all the recordings of the histogram.
* @param positiveBuckets the buckets counting positive recordings.
* @param negativeBuckets the buckets coutning negative recordings.
* @param negativeBuckets the buckets counting negative recordings.
* @param zeroCount The amount of time zero was recorded.
* @param exemplars The exemplars.
* @return a new {@link ExponentialHistogramAccumulation} with the given values.