From f8da8a880def2cd90450a55d2caf86e2c1eb22c8 Mon Sep 17 00:00:00 2001 From: Eunbin Son Date: Mon, 22 Jun 2026 11:30:27 +0900 Subject: [PATCH] Fix profiles data model attribute count parameter name and timestamp doc unit ProfileData.create's parameter was named droppedAttributesCount, but the value is exposed via getTotalAttributeCount() and ProfileMarshaler derives the dropped count as total minus attached attributes, mirroring the Span family. Rename the parameter to totalAttributeCount to match the getter. SampleData.getTimestamps() javadoc said timestamps are in ms, but SampleMarshaler serializes them to the timestamps_unix_nano field and they must fall within the profile's nanosecond time range. Fix the unit to nanoseconds. --- .../java/io/opentelemetry/sdk/profiles/data/ProfileData.java | 4 ++-- .../java/io/opentelemetry/sdk/profiles/data/SampleData.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/profiles/src/main/java/io/opentelemetry/sdk/profiles/data/ProfileData.java b/sdk/profiles/src/main/java/io/opentelemetry/sdk/profiles/data/ProfileData.java index 9e30af7f4e0..913ae5d0c22 100644 --- a/sdk/profiles/src/main/java/io/opentelemetry/sdk/profiles/data/ProfileData.java +++ b/sdk/profiles/src/main/java/io/opentelemetry/sdk/profiles/data/ProfileData.java @@ -39,7 +39,7 @@ static ProfileData create( ValueTypeData periodType, long period, String profileId, - int droppedAttributesCount, + int totalAttributeCount, String originalPayloadFormat, ByteBuffer originalPayload, List attributeIndices) { @@ -54,7 +54,7 @@ static ProfileData create( periodType, period, profileId, - droppedAttributesCount, + totalAttributeCount, originalPayloadFormat, originalPayload, attributeIndices); diff --git a/sdk/profiles/src/main/java/io/opentelemetry/sdk/profiles/data/SampleData.java b/sdk/profiles/src/main/java/io/opentelemetry/sdk/profiles/data/SampleData.java index af2958a0317..303fd989f0d 100644 --- a/sdk/profiles/src/main/java/io/opentelemetry/sdk/profiles/data/SampleData.java +++ b/sdk/profiles/src/main/java/io/opentelemetry/sdk/profiles/data/SampleData.java @@ -55,8 +55,8 @@ static SampleData create( List getValues(); /** - * Timestamps associated with Sample represented in ms. These timestamps are expected to fall - * within the Profile's time range. + * Timestamps associated with Sample represented as nanoseconds past the epoch. These timestamps + * are expected to fall within the Profile's time range. */ List getTimestamps(); }