diff --git a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/internal/data/ImmutableProfileData.java b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/internal/data/ImmutableProfileData.java index c9b4a642ad3..520139b2452 100644 --- a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/internal/data/ImmutableProfileData.java +++ b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/internal/data/ImmutableProfileData.java @@ -6,7 +6,7 @@ package io.opentelemetry.exporter.otlp.internal.data; import com.google.auto.value.AutoValue; -import io.opentelemetry.api.common.Attributes; +import io.opentelemetry.exporter.internal.otlp.AttributeKeyValue; import io.opentelemetry.exporter.otlp.profiles.AttributeUnitData; import io.opentelemetry.exporter.otlp.profiles.FunctionData; import io.opentelemetry.exporter.otlp.profiles.LinkData; @@ -48,7 +48,7 @@ public static ProfileData create( List locationTable, List locationIndices, List functionTable, - Attributes attributeTable, + List> attributeTable, List attributeUnits, List linkTable, List stringTable, diff --git a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/LocationData.java b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/LocationData.java index 056e36c7026..78fdfc4cdd6 100644 --- a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/LocationData.java +++ b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/LocationData.java @@ -38,5 +38,5 @@ public interface LocationData { boolean isFolded(); /** References to attributes in Profile.attribute_table. */ - List getAttributes(); + List getAttributeIndices(); } diff --git a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/LocationMarshaler.java b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/LocationMarshaler.java index 88e1d1a26a4..40360c0eafc 100644 --- a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/LocationMarshaler.java +++ b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/LocationMarshaler.java @@ -30,7 +30,7 @@ static LocationMarshaler create(LocationData locationData) { locationData.getAddress(), LineMarshaler.createRepeated(locationData.getLines()), locationData.isFolded(), - locationData.getAttributes()); + locationData.getAttributeIndices()); } static LocationMarshaler[] createRepeated(List items) { diff --git a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/ProfileData.java b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/ProfileData.java index d37e901206b..0f6ef8e6ea3 100644 --- a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/ProfileData.java +++ b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/ProfileData.java @@ -5,8 +5,8 @@ package io.opentelemetry.exporter.otlp.profiles; -import io.opentelemetry.api.common.Attributes; import io.opentelemetry.api.internal.OtelEncodingUtils; +import io.opentelemetry.exporter.internal.otlp.AttributeKeyValue; import io.opentelemetry.sdk.common.InstrumentationScopeInfo; import io.opentelemetry.sdk.resources.Resource; import java.nio.ByteBuffer; @@ -51,7 +51,7 @@ public interface ProfileData { List getFunctionTable(); /** Lookup table for attributes. */ - Attributes getAttributeTable(); + List> getAttributeTable(); /** Represents a mapping between Attribute Keys and Units. */ List getAttributeUnits(); diff --git a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/ProfileMarshaler.java b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/ProfileMarshaler.java index be4215c8b9f..8d04bbbf94f 100644 --- a/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/ProfileMarshaler.java +++ b/exporters/otlp/profiles/src/main/java/io/opentelemetry/exporter/otlp/profiles/ProfileMarshaler.java @@ -51,7 +51,7 @@ static ProfileMarshaler create(ProfileData profileData) { FunctionMarshaler[] functionMarshalers = FunctionMarshaler.createRepeated(profileData.getFunctionTable()); KeyValueMarshaler[] attributeTableMarshalers = - KeyValueMarshaler.createForAttributes(profileData.getAttributeTable()); + KeyValueMarshaler.createRepeated(profileData.getAttributeTable()); AttributeUnitMarshaler[] attributeUnitsMarshalers = AttributeUnitMarshaler.createRepeated(profileData.getAttributeUnits()); LinkMarshaler[] linkMarshalers = LinkMarshaler.createRepeated(profileData.getLinkTable()); diff --git a/exporters/otlp/profiles/src/test/java/io/opentelemetry/exporter/otlp/profiles/ProfilesRequestMarshalerTest.java b/exporters/otlp/profiles/src/test/java/io/opentelemetry/exporter/otlp/profiles/ProfilesRequestMarshalerTest.java index c7c2deec381..3ed1d9159d2 100644 --- a/exporters/otlp/profiles/src/test/java/io/opentelemetry/exporter/otlp/profiles/ProfilesRequestMarshalerTest.java +++ b/exporters/otlp/profiles/src/test/java/io/opentelemetry/exporter/otlp/profiles/ProfilesRequestMarshalerTest.java @@ -151,7 +151,7 @@ void compareResourceProfilesMarshaling() { Collections.emptyList(), listOf(1, 2), Collections.emptyList(), - Attributes.empty(), + Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), Collections.emptyList(),