Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java] Add support for Sentry Metrics #3190

Closed
7 of 8 tasks
Tracked by #56 ...
smeubank opened this issue Feb 5, 2024 · 3 comments
Closed
7 of 8 tasks
Tracked by #56 ...

[Java] Add support for Sentry Metrics #3190

smeubank opened this issue Feb 5, 2024 · 3 comments
Assignees

Comments

@smeubank
Copy link
Member

smeubank commented Feb 5, 2024

Description

Metrics! Sentry will support Metrics finally! First we need all of our SDKs to support Metrics, including Java and dependent SDKs

Requirements:

Question:

How much of this can the Android SDK inherit if added in Java?

All of it.

Document(s)

Develop Specs
SDK Develop Specs
Product Specs

@smeubank smeubank changed the title Java/Kotlin Add support for Sentry Metrics Feb 5, 2024
@smeubank smeubank transferred this issue from getsentry/team-sdks Feb 5, 2024
@markushi markushi self-assigned this Feb 13, 2024
@markushi
Copy link
Member

markushi commented Feb 13, 2024

Having looked into the docs and the .NET implementation I want to highlight a few development aspects:

  • The product specs describe the overall API behavior best
  • We not only need to provide APIs on the SDK side, but also need some basic logic to aggregate metrics into 10s buckets
  • We need some async flush functionality to send past buckets to our backend
  • There's a new envelope item, type = statsd for sending metrics
  • We have to keep thread safety (metrics can be emitted by any thread, reading and cleaning up happens every 10s) in mind
  • There's a timing API which connects spans with metrics AND creates gauge metrics aka "summaries" of metrics on a span level
  • When capturing metrics, stack traces are used to determine a code location for an emitted metric, if feasible at all, some caching needs to be done

To get going fast let's split this up into smaller PRs / tasks:

  • Implement basic API, add protocol definitions for sending statsd envelope items
  • Add support for code locations, linking metrics to source code
  • Add support for the timing API, connecting spans with metrics and creating gauges

@markushi markushi mentioned this issue Feb 14, 2024
7 tasks
@smeubank smeubank changed the title Add support for Sentry Metrics [Java] Add support for Sentry Metrics Feb 19, 2024
@smeubank
Copy link
Member Author

smeubank commented Feb 19, 2024

The product specs describe the overall API behavior best

@markushi do you mean the develop spec? the link is to develop docs, not product

Thanks for investigating in more detail!

@kahest
Copy link
Member

kahest commented Mar 8, 2024

released with 7.6.0 (excluding code location, which is currently blocked and tracked separately)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants