-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relax the ServiceManager singleton nature (#671)
* allow setting the ServiceManager and only create if needed at build() time. * create InstallationContext * update AndroidInstrumentation.install() to take the InstallationContext. * decouple instrumentations from ServiceManager singleton * pull static usage up * remove static create method * remove static create() in favor of constructor * pull operational object out of disk buffer config and promote to OTRB setter with same sane defaults. * move opinionated default list of services out of ServiceManager interface and into impl * remove static call and just test the impl * cleanup * eliminate test dep on ServiceManager static usage * finally remove singleton nature from ServiceManager. * add period
- Loading branch information
1 parent
6aed8f6
commit 85e48b8
Showing
27 changed files
with
236 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
core/src/main/java/io/opentelemetry/android/instrumentation/InstallationContext.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright The OpenTelemetry Authors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package io.opentelemetry.android.instrumentation | ||
|
||
import android.app.Application | ||
import io.opentelemetry.android.internal.services.ServiceManager | ||
import io.opentelemetry.api.OpenTelemetry | ||
|
||
data class InstallationContext( | ||
val application: Application, | ||
val openTelemetry: OpenTelemetry, | ||
val serviceManager: ServiceManager, | ||
) |
Oops, something went wrong.