Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ This project hosts the following modules:
- `features/dd-sdk-android-trace-internal`: a library containing internal classes for the Trace library;
- `features/dd-sdk-android-trace-otel`: an extension of Trace library to integrate with [OpenTelemetry](https://opentelemetry.io/);
- `features/dd-sdk-android-webview`: a library to forward logs and RUM events captured in a webview to be linked with the mobile session;
- `features/dd-sdk-android-profiling`: a library to record application performance profiles;
- `integrations/***`: a set of libraries integrating Datadog products in third party libraries:
- `integrations/dd-sdk-android-coil`: a lightweight library providing a bridge integration between Datadog SDK and [Coil](https://coil-kt.github.io/coil/);
- `integrations/dd-sdk-android-compose`: a lightweight library providing a bridge integration between Datadog SDK and [Jetpack Compose](https://developer.android.com/jetpack/compose);
Expand Down
18 changes: 18 additions & 0 deletions ci/pipelines/default-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ analysis:detekt-custom:
- ./gradlew :features:dd-sdk-android-trace:customDetektRules
- ./gradlew :features:dd-sdk-android-trace-otel:customDetektRules
- ./gradlew :features:dd-sdk-android-webview:customDetektRules
- ./gradlew :features:dd-sdk-android-profiling:customDetektRules
- ./gradlew :integrations:dd-sdk-android-coil:customDetektRules
- ./gradlew :integrations:dd-sdk-android-compose:customDetektRules
- ./gradlew :integrations:dd-sdk-android-fresco:customDetektRules
Expand Down Expand Up @@ -714,6 +715,22 @@ publish:release-webview:
paths:
- features/dd-sdk-android-webview/verification-metadata.xml

publish:release-profiling:
tags: [ "arch:amd64" ]
only:
- tags
- develop
image: $CI_IMAGE_DOCKER
stage: publish
timeout: 30m
script:
- !reference [.snippets, set-publishing-credentials]
- ./gradlew :features:dd-sdk-android-profiling:publishToSonatype closeSonatypeStagingRepository --stacktrace --no-daemon
artifacts:
when: on_success
expire_in: 7 days
paths:
- features/dd-sdk-android-profiling/verification-metadata.xml
# endregion

# region Publish integrations/*
Expand Down Expand Up @@ -1051,6 +1068,7 @@ notify:merge-verification-metadata:
- publish:release-session-replay-material
- publish:release-session-replay-compose
- publish:release-webview
- publish:release-profiling
- publish:release-coil
- publish:release-compose
- publish:release-fresco
Expand Down
18 changes: 18 additions & 0 deletions features/dd-sdk-android-profiling/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Built application files
*.apk
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/

# Gradle files
build/
91 changes: 91 additions & 0 deletions features/dd-sdk-android-profiling/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import com.datadog.gradle.config.androidLibraryConfig
import com.datadog.gradle.config.dependencyUpdateConfig
import com.datadog.gradle.config.detektCustomConfig
import com.datadog.gradle.config.javadocConfig
import com.datadog.gradle.config.junitConfig
import com.datadog.gradle.config.kotlinConfig
import com.datadog.gradle.config.publishingConfig
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
// Build
id("com.android.library")
kotlin("android")
id("com.google.devtools.ksp")

// Publish
`maven-publish`
signing
id("org.jetbrains.dokka-javadoc")

// Analysis tools
id("com.github.ben-manes.versions")

// Tests
id("de.mobilej.unmock")
id("org.jetbrains.kotlinx.kover")

// Internal Generation
id("com.datadoghq.dependency-license")
id("apiSurface")
id("transitiveDependencies")
id("verificationXml")
id("binary-compatibility-validator")
}

android {
namespace = "com.datadog.android.profiling"
}

dependencies {
api(project(":dd-sdk-android-core"))
implementation(libs.kotlin)

// Generate NoOp implementations
ksp(project(":tools:noopfactory"))

testImplementation(project(":tools:unit")) {
attributes {
attribute(
com.android.build.api.attributes.ProductFlavorAttr.of("platform"),
objects.named("jvm")
)
}
}

testImplementation(libs.bundles.jUnit5)
testImplementation(libs.bundles.testTools)
unmock(libs.robolectric)
}

unMock {
keep("android.os.BaseBundle")
keep("android.os.Bundle")
keep("android.os.Parcel")
keepStartingWith("com.android.internal.util.")
keepStartingWith("android.util.")
keep("android.content.ComponentName")
keep("android.content.ContentProvider")
keep("android.content.IContentProvider")
keep("android.content.ContentProviderNative")
keep("android.net.Uri")
keep("android.os.Handler")
keep("android.os.IMessenger")
keep("android.os.Looper")
keep("android.os.Message")
keep("android.os.MessageQueue")
keep("android.os.SystemProperties")
keep("android.view.DisplayEventReceiver")
keepStartingWith("org.json")
}

kotlinConfig(jvmBytecodeTarget = JvmTarget.JVM_11)
androidLibraryConfig()
junitConfig()
javadocConfig()
dependencyUpdateConfig()
publishingConfig(
"The Profiling feature to use with the Datadog monitoring " +
"library for Android applications."
)
detektCustomConfig()
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2016-Present Datadog, Inc.
*/

package com.datadog.android.profiling

/**
* An entry point to Datadog Profiling feature.
*/
object Profiling {
// TODO RUM-11831: Integrate Perfetto Profiling Manager API
}
1 change: 1 addition & 0 deletions local_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ if [[ $CLEANUP == 1 ]]; then
rm -rf features/dd-sdk-android-trace/build/
rm -rf features/dd-sdk-android-trace-otel/build/
rm -rf features/dd-sdk-android-webview/build/
rm -rf features/dd-sdk-android-profiling/build/
rm -rf integrations/dd-sdk-android-coil/build/
rm -rf integrations/dd-sdk-android-compose/build/
rm -rf integrations/dd-sdk-android-fresco/build/
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ include(":features:dd-sdk-android-session-replay")
include(":features:dd-sdk-android-session-replay-compose")
include(":features:dd-sdk-android-session-replay-material")
include(":features:dd-sdk-android-trace-otel")
include(":features:dd-sdk-android-profiling")

// INTEGRATION LIBRARIES
include(":integrations:dd-sdk-android-coil")
Expand Down
Loading