-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
There was a problem hiding this 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.
...main/java/io/opentelemetry/instrumentation/library/log/internal/LogRecordBuilderCreator.java
Outdated
Show resolved
Hide resolved
...rary/src/main/java/io/opentelemetry/instrumentation/library/log/AndroidLogSubstitutions.java
Outdated
Show resolved
Hide resolved
...rary/src/main/java/io/opentelemetry/instrumentation/library/log/AndroidLogSubstitutions.java
Outdated
Show resolved
Hide resolved
...rary/src/main/java/io/opentelemetry/instrumentation/library/log/AndroidLogSubstitutions.java
Outdated
Show resolved
Hide resolved
|
||
public class AndroidLogSubstitutions { | ||
|
||
public static String TAG_KEY = "android.tag"; |
There was a problem hiding this comment.
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).
public static String TAG_KEY = "android.tag"; | |
public final static AttributeKey<String> TAG_KEY = AttributeKey.stringKey("android.tag"); |
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! |
...rary/src/main/java/io/opentelemetry/instrumentation/library/log/AndroidLogSubstitutions.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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. 😎
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 🙏
maybe fixes #142