Skip to content

Commit

Permalink
more breakage and todos
Browse files Browse the repository at this point in the history
  • Loading branch information
breedx-splk committed Aug 13, 2024
1 parent d93a6a0 commit e77e909
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
import io.opentelemetry.android.instrumentation.activity.VisibleScreenTracker;
import io.opentelemetry.android.instrumentation.anr.AnrDetector;
import io.opentelemetry.android.instrumentation.crash.CrashReporter;
import io.opentelemetry.android.instrumentation.lifecycle.AndroidLifecycleInstrumentation;
import io.opentelemetry.android.instrumentation.network.CurrentNetworkProvider;
import io.opentelemetry.android.instrumentation.slowrendering.SlowRenderingDetector;
import io.opentelemetry.android.instrumentation.startup.AppStartupTimer;
import io.opentelemetry.api.trace.Tracer;
import io.opentelemetry.exporter.logging.LoggingSpanExporter;
import io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporter;
Expand Down Expand Up @@ -95,20 +91,24 @@ SplunkRum initialize(Looper mainLooper) {
GlobalAttributesSupplier globalAttributeSupplier =
new GlobalAttributesSupplier(builder.globalAttributes);
config.setGlobalAttributes(globalAttributeSupplier);
if (!builder.isNetworkMonitorEnabled()) {
config.disableNetworkChangeMonitoring();
}

// TODO: Note/document this instrumentation is now opt-in via application classpath via build settings
// if (!builder.isNetworkMonitorEnabled()) {
// config.disableNetworkChangeMonitoring();
// }

config.disableScreenAttributes();
OpenTelemetryRumBuilder otelRumBuilder = OpenTelemetryRum.builder(application, config);

otelRumBuilder.mergeResource(createSplunkResource());
initializationEvents.emit("resourceInitialized");

CurrentNetworkProvider currentNetworkProvider =
CurrentNetworkProvider.createAndStart(application);
otelRumBuilder.setCurrentNetworkProvider(currentNetworkProvider);
initializationEvents.emit("connectionUtilInitialized");
// TODO: now spelled rum.sdk.init.net.provider and currently mixed up in network
// attributes enabled config in upstream
// CurrentNetworkProvider currentNetworkProvider =
// CurrentNetworkProvider.createAndStart(application);
// otelRumBuilder.setCurrentNetworkProvider(currentNetworkProvider);
// initializationEvents.emit("connectionUtilInitialized");

// TODO: How truly important is the order of these span processors? The location of event
// generation should probably not be altered...
Expand Down

0 comments on commit e77e909

Please sign in to comment.