Drop deprecated instrumentation library methods from log sdk (#4374)

This commit is contained in:
jack-berg 2022-04-11 13:26:38 -05:00 committed by GitHub
parent 0956a75940
commit f99fdd8269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 43 deletions

View File

@ -8,7 +8,6 @@ package io.opentelemetry.sdk.logs.data;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.trace.SpanContext;
import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
import io.opentelemetry.sdk.internal.InstrumentationScopeUtil;
import io.opentelemetry.sdk.resources.Resource;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
@ -24,16 +23,6 @@ public interface LogData {
/** Returns the resource of this log. */
Resource getResource();
/**
* Returns the instrumentation library that generated this log.
*
* @deprecated Use {@link #getInstrumentationScopeInfo()}.
*/
@Deprecated
default io.opentelemetry.sdk.common.InstrumentationLibraryInfo getInstrumentationLibraryInfo() {
return InstrumentationScopeUtil.toInstrumentationLibraryInfo(getInstrumentationScopeInfo());
}
/** Returns the instrumentation scope that generated this log. */
InstrumentationScopeInfo getInstrumentationScopeInfo();

View File

@ -11,7 +11,6 @@ import io.opentelemetry.api.trace.SpanContext;
import io.opentelemetry.context.Context;
import io.opentelemetry.sdk.common.Clock;
import io.opentelemetry.sdk.common.InstrumentationScopeInfo;
import io.opentelemetry.sdk.internal.InstrumentationScopeUtil;
import io.opentelemetry.sdk.resources.Resource;
import java.time.Instant;
import java.util.concurrent.TimeUnit;
@ -38,37 +37,6 @@ public final class LogDataBuilder {
this.clock = clock;
}
/**
* Returns a new {@link LogDataBuilder} with the default clock.
*
* @deprecated Use {@link #create(Resource, InstrumentationScopeInfo)}.
*/
@Deprecated
public static LogDataBuilder create(
Resource resource,
io.opentelemetry.sdk.common.InstrumentationLibraryInfo instrumentationLibraryInfo) {
return create(
resource,
InstrumentationScopeUtil.toInstrumentationScopeInfo(instrumentationLibraryInfo),
Clock.getDefault());
}
/**
* Returns a new {@link LogDataBuilder}.
*
* @deprecated Use {@link #create(Resource, InstrumentationScopeInfo, Clock)}.
*/
@Deprecated
public static LogDataBuilder create(
Resource resource,
io.opentelemetry.sdk.common.InstrumentationLibraryInfo instrumentationLibraryInfo,
Clock clock) {
return new LogDataBuilder(
resource,
InstrumentationScopeUtil.toInstrumentationScopeInfo(instrumentationLibraryInfo),
clock);
}
/** Returns a new {@link LogDataBuilder} with the default clock. */
public static LogDataBuilder create(
Resource resource, InstrumentationScopeInfo instrumentationScopeInfo) {