-
-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Aggregate metrics for spans * Add manifest property * Add metrics sample Activity * Update Changelog * Minor cleanup * Update sentry-android-core/src/test/java/io/sentry/android/core/ManifestMetadataReaderTest.kt Co-authored-by: Stefano <stefano.siano@sentry.io> * Address PR feedback * Address PR feedback * Address PR feedback --------- Co-authored-by: Stefano <stefano.siano@sentry.io>
- Loading branch information
1 parent
02729df
commit e37359d
Showing
49 changed files
with
1,607 additions
and
149 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
52 changes: 52 additions & 0 deletions
52
...samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MetricsActivity.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,52 @@ | ||
package io.sentry.samples.android | ||
|
||
import android.os.Bundle | ||
import androidx.activity.ComponentActivity | ||
import androidx.activity.compose.setContent | ||
import androidx.compose.foundation.layout.Column | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material3.Button | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Surface | ||
import androidx.compose.material3.Text | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
import io.sentry.Sentry | ||
import kotlin.random.Random | ||
|
||
class MetricsActivity : ComponentActivity() { | ||
|
||
override fun onCreate(savedInstanceState: Bundle?) { | ||
super.onCreate(savedInstanceState) | ||
setContent { | ||
MaterialTheme { | ||
Surface { | ||
Column( | ||
modifier = Modifier.padding(20.dp) | ||
) { | ||
Button(onClick = { | ||
Sentry.metrics().increment("example.increment") | ||
}) { | ||
Text(text = "Increment") | ||
} | ||
Button(onClick = { | ||
Sentry.metrics().distribution("example.distribution", Random.nextDouble()) | ||
}) { | ||
Text(text = "Distribution") | ||
} | ||
Button(onClick = { | ||
Sentry.metrics().gauge("example.gauge", Random.nextDouble()) | ||
}) { | ||
Text(text = "Gauge") | ||
} | ||
Button(onClick = { | ||
Sentry.metrics().set("example.set", Random.nextInt()) | ||
}) { | ||
Text(text = "Set") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Oops, something went wrong.