Skip to content

fix: Switch instrumentation code to return version stored in DEFAULT_INSTRUMENTATION_VERSION #918

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

Merged
merged 5 commits into from
Nov 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Switch instrumentation code to return version stored in DEFAULT_…
…INSTRUMENTATION_VERSION
  • Loading branch information
losalex committed Nov 4, 2022
commit a8afbbf53696cc1635d5621a213f1b3e4bf57d6b
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public class LoggingAppender extends UnsynchronizedAppenderBase<ILoggingEvent> {
private static final List<LoggingEventEnhancer> DEFAULT_LOGGING_EVENT_ENHANCERS =
ImmutableList.<LoggingEventEnhancer>of(new MDCEventEnhancer());
public static final String JAVA_LOGBACK_LIBRARY_NAME = "java-logback";
// {x-version-update:google-cloud-logging-logback:current}
// {x-version-update-start:google-cloud-logging-logback:current}
public static final String DEFAULT_INSTRUMENTATION_VERSION = "1.0.0";
// {x-version-update-end}
private static boolean instrumentationAdded = false;
Expand Down Expand Up @@ -348,7 +348,7 @@ protected void append(ILoggingEvent e) {
if (!setInstrumentationStatus(true)) {
entriesList.add(
Instrumentation.createDiagnosticEntry(
JAVA_LOGBACK_LIBRARY_NAME, Instrumentation.getLibraryVersion(LoggingAppender.class)));
JAVA_LOGBACK_LIBRARY_NAME, DEFAULT_INSTRUMENTATION_VERSION));
}
Iterable<LogEntry> entries = entriesList;
if (autoPopulateMetadata) {
Expand Down