Skip to content

Values / timestamp relationship not respected in otlp profiling spec #701

@brancz

Description

@brancz

I just updated Parca to the latest otel profiling spec, and according to the spec:

// A Sample MUST have have at least one values or timestamps_unix_nano entry. If
// both fields are populated, they MUST contain the same number of elements, and
// the elements at the same index MUST refer to the same event.

Specifically the second sentence: If both fields are populated, they MUST contain the same number of elements, and the elements at the same index MUST refer to the same event.

For this reason Parca now has a validation:

if len(s.Value) > 0 && len(s.TimestampsUnixNano) > 0 && len(s.Value) != len(s.TimestampsUnixNano) {
        return fmt.Errorf("sample value length %d does not match sample timestamps length %d", len(s.Value), len(s.TimestampsUnixNano))
}

When I ran the latest commit of the ebpf-profiler against that validation I got this error:

sample value length 1 does not match sample timestamps length 4

It seems like either the ebpf-profiler is not adhereing to the spec, or we need to adjust the spec.

@florianl @rockdaboot @fabled @christos68k

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions