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

add build-time android.util.Log call-site substitutions #911

Merged
merged 5 commits into from
Apr 4, 2025

Conversation

cleverchuk
Copy link
Contributor

maybe fixes #142

@cleverchuk cleverchuk requested a review from a team as a code owner March 26, 2025 15:54
Copy link
Contributor

@LikeTheSalad LikeTheSalad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This is a great start.


public class AndroidLogSubstitutions {

public static String TAG_KEY = "android.tag";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the guidance is more to use the AttributeKey class, because avoids having to make a new AttributeKey each time (like the pure string version does).

Suggested change
public static String TAG_KEY = "android.tag";
public final static AttributeKey<String> TAG_KEY = AttributeKey.stringKey("android.tag");

@breedx-splk
Copy link
Contributor

Along with our goal of having READMEs for each instrumentation that describe the telemetry they omit, I think we should include a README in this PR. Thanks!

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good, @cleverchuk thanks for the submission! I'd like us to reference the semconv before merging, and I think we should open an issue to convert some of the assertions to use the upstream test utils, which has more expressive type-specific assertsions for the logs classes....but I think we're close. 😎

@cleverchuk cleverchuk requested a review from breedx-splk April 2, 2025 17:22
Copy link
Contributor

@LikeTheSalad LikeTheSalad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🙏

@LikeTheSalad LikeTheSalad merged commit fb9f8c8 into open-telemetry:main Apr 4, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Android OTEL Logging exporter
3 participants