Skip to content

Commit

Permalink
clean up spotless formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tonzhan2 committed Jan 23, 2025
1 parent 8b78e99 commit 1f74cff
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,39 +22,48 @@
import io.opentelemetry.instrumentation.api.instrumenter.Instrumenter;
import javax.net.ssl.SSLSocketFactory;

/** Entrypoint for tracing Volley clients. */
/**
* Entrypoint for tracing Volley clients.
*
* @deprecated This API is deprecated and will be removed in a future release.
*/
@Deprecated
public final class VolleyTracing {

/**
* @deprecated This method is deprecated and will be removed in a future release. Returns a new
* {@link VolleyTracing} configured with the given {@link SplunkRum}.
* Returns a new {@link VolleyTracing} configured with the given {@link SplunkRum}.
*
* @deprecated This method is deprecated and will be removed in a future release.
*/
@Deprecated
public static VolleyTracing create(SplunkRum splunkRum) {
return create(splunkRum.getOpenTelemetry());
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Returns a new
* {@link VolleyTracing} configured with the given {@link OpenTelemetry}.
* Returns a new {@link VolleyTracing} configured with the given {@link OpenTelemetry}.
*
* @deprecated This method is deprecated and will be removed in a future release.
*/
@Deprecated
public static VolleyTracing create(OpenTelemetry openTelemetry) {
return builder(openTelemetry).build();
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Returns a new
* {@link VolleyTracingBuilder} configured with the given {@link SplunkRum}.
* Returns a new {@link VolleyTracingBuilder} configured with the given {@link SplunkRum}.
*
* @deprecated This method is deprecated and will be removed in a future release.
*/
@Deprecated
public static VolleyTracingBuilder builder(SplunkRum splunkRum) {
return new VolleyTracingBuilder(splunkRum.getOpenTelemetry());
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Returns a new
* {@link VolleyTracingBuilder} configured with the given {@link OpenTelemetry}.
* Returns a new {@link VolleyTracingBuilder} configured with the given {@link OpenTelemetry}.
*
* @deprecated This method is deprecated and will be removed in a future release.
*/
@Deprecated
public static VolleyTracingBuilder builder(OpenTelemetry openTelemetry) {
Expand All @@ -72,28 +81,31 @@ public static VolleyTracingBuilder builder(OpenTelemetry openTelemetry) {
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Returns a new
* {@link HurlStack} capable of tracing requests.
* Returns a new {@link HurlStack} capable of tracing requests.
*
* @deprecated This method is deprecated and will be removed in a future release.
*/
@Deprecated
public HurlStack newHurlStack() {
return new TracingHurlStack(instrumenter);
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Returns a new
* {@link HurlStack} capable of tracing requests configured with given {@link
* HurlStack.UrlRewriter}.
* Returns a new {@link HurlStack} capable of tracing requests configured with given {@link
* HurlStack.UrlRewriter}.
*
* @deprecated This method is deprecated and will be removed in a future release.
*/
@Deprecated
public HurlStack newHurlStack(HurlStack.UrlRewriter urlRewriter) {
return new TracingHurlStack(instrumenter, urlRewriter);
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Returns a new
* {@link HurlStack} capable of tracing requests configured with given {@link
* HurlStack.UrlRewriter} and {@link SSLSocketFactory}.
* Returns a new {@link HurlStack} capable of tracing requests configured with given {@link
* HurlStack.UrlRewriter} and {@link SSLSocketFactory}.
*
* @deprecated This method is deprecated and will be removed in a future release.
*/
@Deprecated
public HurlStack newHurlStack(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
import java.util.ArrayList;
import java.util.List;

/** A builder for {@link VolleyTracing}. */
/**
* @deprecated This API is deprecated and will be removed in a future release. A builder for {@link
* VolleyTracing}.
*/
@Deprecated
public final class VolleyTracingBuilder {

private static final String INSTRUMENTATION_NAME = "com.splunk.android.volley";
Expand All @@ -48,8 +52,10 @@ public final class VolleyTracingBuilder {
}

/**
* @deprecated This method is deprecated and will be removed in a future release Adds an
* additional {@link AttributesExtractor} to invoke to set attributes to instrumented items.
* Adds an additional {@link AttributesExtractor} to invoke to set attributes to instrumented
* items.
*
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public VolleyTracingBuilder addAttributesExtractor(
Expand All @@ -59,9 +65,10 @@ public VolleyTracingBuilder addAttributesExtractor(
}

/**
* @deprecated This method is deprecated and will be removed in a future release Configures the
* HTTP request headers that will be captured as span attributes.
* Configures the HTTP request headers that will be captured as span attributes.
*
* @param requestHeaders A list of HTTP header names.
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public VolleyTracingBuilder setCapturedRequestHeaders(List<String> requestHeaders) {
Expand All @@ -70,9 +77,10 @@ public VolleyTracingBuilder setCapturedRequestHeaders(List<String> requestHeader
}

/**
* @deprecated This method is deprecated and will be removed in a future release Configures the
* HTTP response headers that will be captured as span attributes.
* Configures the HTTP response headers that will be captured as span attributes.
*
* @param responseHeaders A list of HTTP header names.
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public VolleyTracingBuilder setCapturedResponseHeaders(List<String> responseHeaders) {
Expand All @@ -81,8 +89,9 @@ public VolleyTracingBuilder setCapturedResponseHeaders(List<String> responseHead
}

/**
* @deprecated This method is deprecated and will be removed in a future release Returns a new
* {@link VolleyTracing} with the settings of this {@link VolleyTracingBuilder}.
* Returns a new {@link VolleyTracing} with the settings of this {@link VolleyTracingBuilder}.
*
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public VolleyTracing build() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
* This annotation can be used to customize the {@code screen.name} attribute for an instrumented
* Fragment or Activity. @Deprecated RumScreenName moved to
* io.opentelemetry.rum.internal.instrumentation package
*
* @deprecated This interface is deprecated and will be removed in a future release
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
Expand Down
30 changes: 18 additions & 12 deletions splunk-otel-android/src/main/java/com/splunk/rum/SplunkRum.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ static SplunkRum initialize(SplunkRumBuilder builder, Application application) {
}

/**
* @deprecated This method is deprecated and will be removed in a future release Starts a UI
* navigation span and remembers the last screen name.
* Starts a UI navigation span and remembers the last screen name.
*
* @param screenName Name of the new screen or null when exiting explicit UI navigation mode.
* @param spanType "Created", "Restarted", or "Resumed"
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public void experimentalSetScreenName(String screenName, String spanType) {
Expand All @@ -138,9 +139,10 @@ public void experimentalSetScreenName(String screenName, String spanType) {
}

/**
* @deprecated This method is deprecated and will be removed in a future release Starts a
* "Created" UI navigation span and remembers the last screen name.
* Starts a "Created" UI navigation span and remembers the last screen name.
*
* @param screenName Name of the new screen or null when exiting explicit UI navigation mode.
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public void experimentalSetScreenName(String screenName) {
Expand Down Expand Up @@ -173,12 +175,13 @@ public static SplunkRum noop() {
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Wrap the
* provided {@link OkHttpClient} with OpenTelemetry and RUM instrumentation. Since {@link
* Call.Factory} is the primary useful interface implemented by the OkHttpClient, this
* should be a drop-in replacement for any usages of OkHttpClient.
* Wrap the provided {@link OkHttpClient} with OpenTelemetry and RUM instrumentation. Since
* {@link Call.Factory} is the primary useful interface implemented by the OkHttpClient, this
* should be a drop-in replacement for any usages of OkHttpClient.
*
* @param client The {@link OkHttpClient} to wrap with OpenTelemetry and RUM instrumentation.
* @return A {@link okhttp3.Call.Factory} implementation.
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public Call.Factory createRumOkHttpCallFactory(OkHttpClient client) {
Expand Down Expand Up @@ -335,11 +338,14 @@ public void integrateWithBrowserRum(WebView webView) {
}

/**
* @deprecated This method is deprecated and will be removed in a future release Updates the
* current location. The latitude and longitude will be appended to every span and event.
* <p>Note: this operation performs an atomic update. You can safely call it from your
* {@code LocationListener} or {@code LocationCallback}.
* Updates the current location. The latitude and longitude will be appended to every span and
* event.
*
* <p>Note: this operation performs an atomic update. You can safely call it from your {@code
* LocationListener} or {@code LocationCallback}.
*
* @param location the current location. Passing {@code null} removes the location data.
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public void updateLocation(@Nullable Location location) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,17 @@ public SplunkRumBuilder setBeaconEndpoint(String beaconEndpoint) {
}

/**
* @deprecated This method is deprecated and will be removed in a future release This method can
* be used to provide a customizer that will have access to the OkHttpSender.Builder before
* the sender is created. Typical use cases for this are to provide custom headers or to
* modify compression settings. This is a pretty large hammer and should be used with
* caution.
* <p>This API is considered incubating and is subject to change.
* This method can be used to provide a customizer that will have access to the
* OkHttpSender.Builder before the sender is created. Typical use cases for this are to provide
* custom headers or to modify compression settings. This is a pretty large hammer and should be
* used with caution.
*
* <p>This API is considered incubating and is subject to change.
*
* @param customizer that can make changes to the OkHttpSender.Builder
* @return {@code this}
* @since 1.4.0
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public SplunkRumBuilder setHttpSenderCustomizer(HttpSenderCustomizer customizer) {
Expand Down Expand Up @@ -168,10 +170,12 @@ public SplunkRumBuilder enableDiskBuffering() {
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Enables
* support for the React Native instrumentation.
* <p>This feature is disabled by default. You can enable it by calling this method.
* Enables support for the React Native instrumentation.
*
* <p>This feature is disabled by default. You can enable it by calling this method.
*
* @return {@code this}
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public SplunkRumBuilder enableReactNativeSupport() {
Expand Down Expand Up @@ -327,17 +331,20 @@ public SplunkRumBuilder enableSessionBasedSampling(double ratio) {
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Creates a new
* instance of {@link SplunkRum} with the settings of this {@link SplunkRumBuilder}.
* <p>You must configure at least the {@linkplain #setApplicationName(String) application
* name}, the {@linkplain #setRealm(String) realm} or the {@linkplain
* #setBeaconEndpoint(String) beacon endpoint}, and the {@linkplain
* #setRumAccessToken(String) access token} before calling this method. Trying to build a
* {@link SplunkRum} instance without any of these will result in an exception being thrown.
* <p>The returned {@link SplunkRum} is set as the global instance {@link
* SplunkRum#getInstance()}. If there was a global {@link SplunkRum} instance configured
* before, this method does not initialize a new one and simply returns the existing
* instance.
* Creates a new instance of {@link SplunkRum} with the settings of this {@link
* SplunkRumBuilder}.
*
* <p>You must configure at least the {@linkplain #setApplicationName(String) application name},
* the {@linkplain #setRealm(String) realm} or the {@linkplain #setBeaconEndpoint(String) beacon
* endpoint}, and the {@linkplain #setRumAccessToken(String) access token} before calling this
* method. Trying to build a {@link SplunkRum} instance without any of these will result in an
* exception being thrown.
*
* <p>The returned {@link SplunkRum} is set as the global instance {@link
* SplunkRum#getInstance()}. If there was a global {@link SplunkRum} instance configured before,
* this method does not initialize a new one and simply returns the existing instance.
*
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public SplunkRum build(Application application) {
Expand Down Expand Up @@ -376,9 +383,10 @@ public SplunkRumBuilder enableBackgroundInstrumentationDeferredUntilForeground()
}

/**
* @deprecated This method is deprecated and will be removed in a future release. Enables
* experimental support for exporting via OTLP instead of Zipkin.
* Enables experimental support for exporting via OTLP instead of Zipkin.
*
* @return {@code this}
* @deprecated This method is deprecated and will be removed in a future release
*/
@Deprecated
public SplunkRumBuilder enableExperimentalOtlpExporter() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
import zipkin2.reporter.okhttp3.OkHttpSender;

/**
* @deprecated This method is deprecated and will be removed in a future release This interface can
* be used to customize the exporter used to send telemetry to Splunk. It is not yet stable and
* its APIs are subject to change at any time.
* This interface can be used to customize the exporter used to send telemetry to Splunk. It is not
* yet stable and its APIs are subject to change at any time.
*
* @since 1.4.0
* @deprecated This API is deprecated and will be removed in a future release.
*/
public interface HttpSenderCustomizer {

Expand Down

0 comments on commit 1f74cff

Please sign in to comment.