Skip to content

Commit c2596fa

Browse files
LikeTheSaladdependabot[bot]v1vapmmachinebmorelli25
authored
Main to 0.x (#315)
* Bump the github-actions group with 1 update (#250) Bumps the github-actions group with 1 update: [actions/upload-artifact](https://github.com/actions/upload-artifact). - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Add sample app (#249) * Created sample app dir * Adding code from sample-app-android-apm * Setting latest lib version on sample app * Updating the sample app README * Adding doc comment * ci(release): use new set of credentials for GPG and Maven Central (#255) * ci(buildkite): vault context switch (#256) * Revert "Bump the github-actions group with 1 update" (#257) * ci(release): use the new vault secret path (#258) * ci(release): fetch field in plain format (#259) * Sim operator fix (#261) * Calling getSimOperator once * Validating simOperator calls * Updated changelog * Using short key id (#262) * Release 0.13.1 (#263) * Preparing for the next release * Update gradle.properties * Update CHANGELOG.asciidoc * Update CHANGELOG.asciidoc --------- Co-authored-by: apmmachine <apmmachine@users.noreply.github.com> Co-authored-by: César <56847527+LikeTheSalad@users.noreply.github.com> * backstage: add tags for the obltmachine/apmmachine and other things (#266) * Release/0.14.0 (#267) * Using gradle version catalog * Clean up * Upgrading dependencies * Updating notice files * Removing okhttp auto-instrumentation * Moving okhttp android test network call to the test * Testing okhttp async calls * Moving all okhttp tests to NetworkCallingActivityTest * Clean up * Adding OTel OkHttp auto-instrumentation * Clean up common dependencies * Removing android-instrumentation module * Adding OTel Android dependency * Initializing OpenTelemetryRum * Created LaunchTimeApplicationListener * Clean up * Adding OTelRumConfig * Updating tests * Preventing compileSdk > 33 to be enforced * Updating app launch metrics test * Updating UI span tests * Adding fragment destruction span UI tests * Updated coroutines context preservation * Updating sample-app * Cleaning up okhttp version lookup * Adding OTel Android note to the README * Updating the OTel Android note * Updated the setup.asciidoc file * Updated notice files * Update docs/setup.asciidoc Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Update docs/setup.asciidoc Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Update docs/setup.asciidoc Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Update docs/setup.asciidoc Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Update docs/setup.asciidoc Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Updating OTel Android note --------- Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Preparing for the next release (#268) Co-authored-by: apmmachine <apmmachine@users.noreply.github.com> * Updated the changelog (#269) * Make resources configurable (#276) * Making OTel resource configurable * Validating configured resource * Adding resource config docs * Updated the CHANGELOG.asciidoc * ci: use VM with the installed tools and fallback otherwise (#274) * Preparing for the next release (#277) Co-authored-by: apmmachine <apmmachine@users.noreply.github.com> * github-action: listen for all the github workflows (#279) * security: add permissions block to workflows (#272) * security: add permissions block to workflows * Add permissions * Documentation update (#281) * Removing links to latest version of artifacts * Adding note to warn users about version 1.13.1 * Update docs/setup.asciidoc Co-authored-by: Emily S <emily.s@elastic.co> * Updating note * Removing 1.13.1 notes --------- Co-authored-by: Emily S <emily.s@elastic.co> * Cicd version validation (#282) * Validating version override format and major/minor values * Reorganizing code * Reorganizing code * Providing clearer function name * Updating setup doc versions in post deploy process (#283) * Cicd release messages update (#284) * Enhancing slack messages when a release is triggered * Showing release input params in slack message * Github action to automatically update version branch after a release (#285) * Created action to automatically update version branch with the latest changes from main after a release * Update .github/workflows/updateVersionBranch.yml Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com> --------- Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com> * Remove compilesdk validation (#292) * Removing androidx libs version constraints * Updating tests * Updating sample app compileSdk version * Updating notice files * Updated the changelog * Preparing for the next release (#294) Co-authored-by: apmmachine <apmmachine@users.noreply.github.com> * Resolving main to release-branch conflicts before creating PR from main (#299) * Upgrade gradle version (#300) * Upgrading to gradle 8.4 * Bumping up gradle env * Using MaxMetaspaceSize * Enabling desugaring * Using new env var mocking lib * Adding buildconfg fields for tests * Updating tests * Using Java 17 * github-action: enable provenance for jar/aar files (#288) * Documentation changes (#302) * Bumping Kotlin min version * Adding signals examples for manual instrumentation * Explaining sessions in the docs * Clean up * github-action: add attestations scope (#305) * Bump upstream version (#304) * Bumping OTel deps and addressing Event api changes * Addressing app listener interface issue * Sorting lifecycle instrumentation * Using new disk buffering api * Adjusting tests to api changes * Bumping up semconv and contrib versions * Making CreateNoticeTask output a dir * Updating jar notice tasks * Adding notice file to repo for android libs * Fixing jar create notice file resources dependency * Bump actions/download-artifact from 3 to 4 in the github-actions group (#306) Bumps the github-actions group with 1 update: [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/download-artifact` from 3 to 4 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Revert "Bump actions/download-artifact from 3 to 4 in the github-actions grou…" (#307) This reverts commit b7d76f4. * github-action: use setup composite action for jdk conf (#311) * Addressing r8 issues (#309) * Updating build-tools processor to not leak compile-only annotation * Bumping up gradle in sample app * Adding R8 common rules * Updating changelog * github-action: delete opentelemetry workflow (#312) * github-action: use actions/attest-build-provenance (#313) * Adding faq on SSL/TLS config (#310) * Adding faq on SSL/TLS * Fixing typo * Update docs/faq.asciidoc Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Update docs/faq.asciidoc Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Update docs/faq.asciidoc Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Update docs/faq.asciidoc Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> --------- Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> * Preparing for the next release (#314) Co-authored-by: apmmachine <apmmachine@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com> Co-authored-by: apmmachine <58790750+apmmachine@users.noreply.github.com> Co-authored-by: apmmachine <apmmachine@users.noreply.github.com> Co-authored-by: Brandon Morelli <brandon.morelli@elastic.co> Co-authored-by: Jan Calanog <jan.calanog@elastic.co> Co-authored-by: Emily S <emily.s@elastic.co>
1 parent a448149 commit c2596fa

File tree

59 files changed

+449
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+449
-222
lines changed

.buildkite/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@ agents:
22
provider: "gcp"
33
image: "family/apm-agent-android-ubuntu-2204"
44

5+
env:
6+
TARBALL_FILE: ${TARBALL_FILE:-dist.tar}
7+
58
steps:
69
- label: "Run the release"
710
key: "release"
811
commands: .ci/release-wrapper.sh
9-
artifact_paths: "release.out"
12+
artifact_paths:
13+
- "release.out"
14+
- "${TARBALL_FILE}"
1015

1116
notify:
1217
- slack:

.ci/release.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if [[ "$target_specifier" == "all" || "$target_specifier" == "mavenCentral" ]];
2525
./gradlew publishElasticPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository $COMMON_GRADLE_DEPLOY_PARAMS
2626
else
2727
echo "--- Release the binaries to Maven Central :package: (dry-run)"
28-
./gradlew tasks
28+
./gradlew assemble
2929
fi
3030
fi
3131

@@ -35,7 +35,11 @@ if [[ "$target_specifier" == "all" || "$target_specifier" == "pluginPortal" ]];
3535
./gradlew publishPlugins -Pgradle.publish.key=$PLUGIN_PORTAL_KEY -Pgradle.publish.secret=$PLUGIN_PORTAL_SECRET $COMMON_GRADLE_DEPLOY_PARAMS
3636
else
3737
echo "--- Release the binaries to Gradle Plugin portal :package: (dry-run)"
38-
./gradlew tasks
38+
./gradlew assemble
3939
fi
4040
fi
41+
42+
echo "--- Archive the build folders with jar/aar files"
43+
find . -type d -name build -exec find {} \( -name '*.jar' -o -name '*.aar' \) -print0 \; | xargs -0 tar -cvf "${TARBALL_FILE:-dist.tar}"
44+
4145
set -x

.github/actions/setup/action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
3+
name: common build tasks
4+
description: Install specific JDK
5+
6+
inputs:
7+
java-version:
8+
description: 'Testing Java version'
9+
required: true
10+
default: '17'
11+
java-distribution:
12+
description: 'Testing Java distribution'
13+
required: true
14+
default: 'temurin'
15+
shell:
16+
description: 'Default shell'
17+
default: 'bash'
18+
required: false
19+
20+
runs:
21+
using: "composite"
22+
steps:
23+
- name: Set up testing JDK
24+
uses: actions/setup-java@v4
25+
with:
26+
java-version: ${{ inputs.java-version }}
27+
distribution: ${{ inputs.java-distribution }}

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
version: 2
23
updates:
34

@@ -14,3 +15,17 @@ updates:
1415
github-actions:
1516
patterns:
1617
- "*"
18+
19+
# GitHub composite actions
20+
- package-ecosystem: "github-actions"
21+
directory: "/.github/actions/setup"
22+
schedule:
23+
interval: "weekly"
24+
day: "sunday"
25+
time: "22:00"
26+
reviewers:
27+
- "elastic/observablt-ci"
28+
groups:
29+
github-actions:
30+
patterns:
31+
- "*"

.github/workflows/ci.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
25+
- uses: ./.github/actions/setup
2526
- name: lint
2627
run: ./gradlew lint
2728
- name: Verify OSS compliance
@@ -31,6 +32,7 @@ jobs:
3132
runs-on: ubuntu-latest
3233
steps:
3334
- uses: actions/checkout@v4
35+
- uses: ./.github/actions/setup
3436
- name: Build
3537
run: ./gradlew assemble
3638
- name: Test
@@ -62,6 +64,12 @@ jobs:
6264
test-release:
6365
runs-on: ubuntu-latest
6466
if: github.event_name != 'pull_request'
67+
permissions:
68+
attestations: write
69+
contents: write
70+
id-token: write
71+
env:
72+
TARBALL_FILE: dist.tar
6573
steps:
6674
- id: buildkite
6775
name: Run Release dry-run
@@ -71,9 +79,30 @@ jobs:
7179
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
7280
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
7381
pipeline: apm-agent-android-release
82+
pipelineBranch: ${{ github.ref_name }}
7483
waitFor: true
7584
printBuildLogs: false
85+
artifactName: signed-artifacts
86+
artifactPath: ${{ env.TARBALL_FILE }}
7687
buildEnvVars: |
77-
branch_specifier=main
88+
branch_specifier=${{ github.ref_name }}
7889
target_specifier=all
7990
dry_run=true
91+
TARBALL_FILE=${{ env.TARBALL_FILE }}
92+
93+
- uses: actions/download-artifact@v3
94+
with:
95+
name: signed-artifacts
96+
97+
- name: untar the buildkite tarball
98+
run: tar xvf ${{ env.TARBALL_FILE }}
99+
100+
- name: generate build provenance (jar files)
101+
uses: actions/attest-build-provenance@951c0c5f8e375ad4efad33405ab77f7ded2358e4 # v1.1.1
102+
with:
103+
subject-path: "${{ github.workspace }}/**/build/libs/*.jar"
104+
105+
- name: generate build provenance (aar files)
106+
uses: actions/attest-build-provenance@951c0c5f8e375ad4efad33405ab77f7ded2358e4 # v1.1.1
107+
with:
108+
subject-path: "${{ github.workspace }}/**/build/outputs/aar/*.aar"

.github/workflows/opentelemetry.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ jobs:
3838
release:
3939
name: Release
4040
runs-on: ubuntu-latest
41-
41+
env:
42+
TARBALL_FILE: dist.tar
43+
permissions:
44+
attestations: write
45+
contents: write
46+
id-token: write
4247
steps:
4348
- id: notification
4449
name: Notify that a release will start
@@ -60,13 +65,34 @@ jobs:
6065
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }}
6166
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }}
6267
pipeline: apm-agent-android-release
68+
pipelineBranch: ${{ github.ref_name }}
6369
waitFor: true
6470
printBuildLogs: false
71+
artifactName: signed-artifacts
72+
artifactPath: ${{ env.TARBALL_FILE }}
6573
buildEnvVars: |
6674
branch_specifier=${{ inputs.branch_specifier || 'main' }}
6775
target_specifier=${{ inputs.target_specifier || 'all' }}
6876
version_override_specifier=${{ inputs.version_override_specifier || '' }}
6977
dry_run=${{ inputs.dry_run || 'false' }}
78+
TARBALL_FILE=${{ env.TARBALL_FILE }}
79+
80+
- uses: actions/download-artifact@v3
81+
with:
82+
name: signed-artifacts
83+
84+
- name: untar the buildkite tarball
85+
run: tar xvf ${{ env.TARBALL_FILE }}
86+
87+
- name: generate build provenance (jar files)
88+
uses: actions/attest-build-provenance@951c0c5f8e375ad4efad33405ab77f7ded2358e4 # v1.1.1
89+
with:
90+
subject-path: "${{ github.workspace }}/**/build/libs/*.jar"
91+
92+
- name: generate build provenance (aar files)
93+
uses: actions/attest-build-provenance@951c0c5f8e375ad4efad33405ab77f7ded2358e4 # v1.1.1
94+
with:
95+
subject-path: "${{ github.workspace }}/**/build/outputs/aar/*.aar"
7096

7197
- if: ${{ success() }}
7298
uses: elastic/apm-pipeline-library/.github/actions/slack-message@current
@@ -109,6 +135,6 @@ jobs:
109135
with:
110136
ref: ${{ inputs.branch_specifier || 'main' }}
111137
token: ${{ env.GITHUB_TOKEN }}
112-
138+
- uses: ./.github/actions/setup
113139
- if: ${{ ! inputs.dry_run }}
114140
run: ./gradlew postDeploy -Prelease=true -Pversion_override=${{ inputs.version_override_specifier || '' }}

.github/workflows/snapshoty.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16+
- uses: ./.github/actions/setup
1617
- name: Assemble
1718
run: ./gradlew assemble
1819
- name: Publish snaphosts

.github/workflows/updateVersionBranch.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ jobs:
3434
text: ${{ github.event.pull_request.head.ref }}
3535
regex: 'post-release/(\d+).+'
3636

37-
- run: gh pr create --base ${{ env.BASE_BRANCH }} --title 'Merge main into version branch' --body 'Created by Github action' --reviewer elastic/apm-agent-android
37+
- run: |
38+
CONFLICT_RESOLUTION_BRANCH="post-release/main-to-${{ env.BASE_BRANCH }}"
39+
git switch ${{ env.BASE_BRANCH }}
40+
git checkout -b $CONFLICT_RESOLUTION_BRANCH
41+
git merge main --strategy-option theirs
42+
git push -u origin $CONFLICT_RESOLUTION_BRANCH
43+
gh pr create --base ${{ env.BASE_BRANCH }} --title 'Merge main into version branch' --body 'Created by Github action :robot:' --reviewer elastic/apm-agent-android
3844
env:
3945
GH_TOKEN: ${{ env.GITHUB_TOKEN }}
4046
BASE_BRANCH: "${{ steps.major-version.outputs.group1 }}.x"

.java-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11
1+
17

CHANGELOG.asciidoc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ ${next_release_notes}
3535
* New feature: {pull}000[#000]
3636
////
3737
38+
[[release-notes-0.17.0]]
39+
==== 0.17.0 - 2024/05/17
40+
41+
[float]
42+
===== Features
43+
44+
* Adding consumer R8 rules to address R8 full mode: {pull}309[#309]
45+
3846
[[release-notes-0.16.0]]
3947
==== 0.16.0 - 2024/04/03
4048
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dependencies.hash=AFDBF157F73953F0B7829B5B718072E7
1+
dependencies.hash=4335DC6BB998D19BBBD590A9B2803A50

android-sdk/build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ shadowJar {
4141
dependencies {
4242
api libs.opentelemetry.sdk
4343
api libs.opentelemetry.android
44-
api libs.opentelemetry.events
44+
api libs.opentelemetry.api.incubator
4545
api libs.stagemonitor.configuration
4646
api libs.okhttp
4747
implementation project(':android-common')
48+
implementation libs.opentelemetry.android.instrumentation.api
49+
implementation libs.opentelemetry.android.instrumentation.lifecycle
4850
implementation libs.androidx.lifecycle
4951
implementation libs.weaklockfree
5052
implementation libs.opentelemetry.exporter.otlp
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
dependencies.hash=77B4570CA3D2C0BA9C3541561D0679C0
1+
dependencies.hash=A0177AAB7C169836786E530C6453B8A1

android-sdk/src/main/java/co/elastic/apm/android/sdk/ElasticApmAgent.java

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import android.app.Application;
2222
import android.content.Context;
2323

24+
import androidx.annotation.NonNull;
2425
import androidx.annotation.RestrictTo;
2526
import androidx.lifecycle.ProcessLifecycleOwner;
2627

@@ -42,7 +43,7 @@
4243
import co.elastic.apm.android.sdk.connectivity.Connectivity;
4344
import co.elastic.apm.android.sdk.connectivity.opentelemetry.SignalConfiguration;
4445
import co.elastic.apm.android.sdk.connectivity.opentelemetry.exporters.VisitableExporters;
45-
import co.elastic.apm.android.sdk.features.persistence.SignalDiskExporter;
46+
import co.elastic.apm.android.sdk.features.persistence.SignalFromDiskExporter;
4647
import co.elastic.apm.android.sdk.instrumentation.Instrumentations;
4748
import co.elastic.apm.android.sdk.internal.api.filter.ComposableFilter;
4849
import co.elastic.apm.android.sdk.internal.configuration.Configurations;
@@ -67,17 +68,18 @@
6768
import co.elastic.apm.android.sdk.session.SessionManager;
6869
import io.opentelemetry.android.OpenTelemetryRum;
6970
import io.opentelemetry.android.config.OtelRumConfig;
71+
import io.opentelemetry.android.features.diskbuffering.DiskBufferingConfiguration;
7072
import io.opentelemetry.android.instrumentation.activity.VisibleScreenTracker;
7173
import io.opentelemetry.android.instrumentation.lifecycle.AndroidLifecycleInstrumentationBuilder;
7274
import io.opentelemetry.android.instrumentation.startup.AppStartupTimer;
7375
import io.opentelemetry.api.GlobalOpenTelemetry;
7476
import io.opentelemetry.api.OpenTelemetry;
7577
import io.opentelemetry.api.common.Attributes;
76-
import io.opentelemetry.api.events.GlobalEventEmitterProvider;
78+
import io.opentelemetry.api.incubator.events.GlobalEventLoggerProvider;
7779
import io.opentelemetry.sdk.logs.LogRecordProcessor;
7880
import io.opentelemetry.sdk.logs.SdkLoggerProviderBuilder;
7981
import io.opentelemetry.sdk.logs.data.LogRecordData;
80-
import io.opentelemetry.sdk.logs.internal.SdkEventEmitterProvider;
82+
import io.opentelemetry.sdk.logs.internal.SdkEventLoggerProvider;
8183
import io.opentelemetry.sdk.metrics.SdkMeterProviderBuilder;
8284
import io.opentelemetry.sdk.metrics.data.MetricData;
8385
import io.opentelemetry.sdk.resources.Resource;
@@ -205,7 +207,7 @@ public static void resetForTest() {
205207
ConnectionHttpAttributesVisitor.resetForTest();
206208
ServiceManager.resetForTest();
207209
GlobalOpenTelemetry.resetForTest();
208-
GlobalEventEmitterProvider.resetForTest();
210+
GlobalEventLoggerProvider.resetForTest();
209211
instance = null;
210212
}
211213

@@ -281,9 +283,8 @@ private void initializeOpentelemetry(Application app, AgentDependenciesInjector
281283
Resource resource = configuration.resource
282284
.merge(Resource.create(resourceAttrs));
283285

284-
OtelRumConfig rumConfig = new OtelRumConfig();
285-
rumConfig.disableNetworkAttributes();
286-
rumConfig.disableNetworkChangeMonitoring();
286+
OtelRumConfig rumConfig = getOtelRumConfig();
287+
287288
OpenTelemetryRum rum = OpenTelemetryRum.builder(app, rumConfig)
288289
.addTracerProviderCustomizer((sdkTracerProviderBuilder, application) -> configureTracerProviderBuilder(sdkTracerProviderBuilder, signalConfiguration, resource, globalAttributesVisitor, sampleRateManager))
289290
.addMeterProviderCustomizer((sdkMeterProviderBuilder, application) -> configureMeterProviderBuilder(sdkMeterProviderBuilder, signalConfiguration, resource, sampleRateManager))
@@ -302,16 +303,28 @@ private void initializeOpentelemetry(Application app, AgentDependenciesInjector
302303

303304
OpenTelemetry openTelemetry = rum.getOpenTelemetry();
304305
GlobalOpenTelemetry.set(openTelemetry);
305-
GlobalEventEmitterProvider.set(SdkEventEmitterProvider.create(openTelemetry.getLogsBridge(), ntpManager.getClock()));
306+
GlobalEventLoggerProvider.set(SdkEventLoggerProvider.create(openTelemetry.getLogsBridge(), ntpManager.getClock()));
306307

307308
if (persistenceInitializer != null) {
308-
SignalDiskExporter.set(persistenceInitializer.createSignalDiskExporter());
309+
SignalFromDiskExporter.set(persistenceInitializer.createSignalDiskExporter());
309310
configuration.persistenceConfiguration.exportScheduler.onPersistenceEnabled();
310311
} else {
311312
configuration.persistenceConfiguration.exportScheduler.onPersistenceDisabled();
312313
}
313314
}
314315

316+
@NonNull
317+
private static OtelRumConfig getOtelRumConfig() {
318+
OtelRumConfig rumConfig = new OtelRumConfig();
319+
rumConfig.disableNetworkAttributes();
320+
rumConfig.disableNetworkChangeMonitoring();
321+
rumConfig.disableAnrDetection();
322+
rumConfig.disableCrashReporting();
323+
rumConfig.disableSlowRenderingDetection();
324+
rumConfig.setDiskBufferingConfiguration(DiskBufferingConfiguration.builder().setEnabled(false).build());
325+
return rumConfig;
326+
}
327+
315328
private PersistenceInitializer tryInitializePersistence(SignalConfiguration signalConfiguration, AgentDependenciesInjector injector) {
316329
if (configuration.persistenceConfiguration.enabled && signalConfiguration instanceof VisitableExporters) {
317330
Elog.getLogger().debug("Initializing the persistence feature");

0 commit comments

Comments
 (0)