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

Sentry.metrics() method not found Version 8.3.0 #86660

Open
adonnini opened this issue Mar 9, 2025 · 1 comment
Open

Sentry.metrics() method not found Version 8.3.0 #86660

adonnini opened this issue Mar 9, 2025 · 1 comment

Comments

@adonnini
Copy link

adonnini commented Mar 9, 2025

Hi, I am using Snetry 8.3.0 in my Android application.
When I try Sentry.metrics().increment compilation fails claiming it cannot find the metrics() method. Could someone help me resolve this issue?

My environment

Android Studio Ladybug patch 2
gradle 8.9
com.android.tools.build:gradle:8.7.2

//DEPENDENCY ENTRY - I DO NOT HAVE A PLUGIN ENTRY
implementation 'io.sentry:sentry-android:8.3.0'

My code

import io.sentry.Sentry;
import java.util.HashMap;
import java.util.Map;
.
.
.
//INSIDE THE METHOD WHOSE EXECUTION COUNT I WANT TO TRACK
		final Map<String, String> tags = new HashMap<>();
		tags.put("onLocationChangedAction", "onLocationChangedAction");

		Sentry.metrics().increment(
				"method_execution_count", // key
				1.0,                      // value
				null,                     // unit
				tags                      // tags
		);

Please let me know if you need additional information.

Thanks

@getsantry
Copy link
Contributor

getsantry bot commented Mar 9, 2025

Assigning to @getsentry/support for routing ⏲️

@getsantry getsantry bot moved this to Waiting for: Support in GitHub Issues with 👀 3 Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Support
Development

No branches or pull requests

1 participant