Skip to content

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

Closed as not planned
Closed as not planned
@adonnini

Description

@adonnini

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions