-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
rhel-10.2
-
None
-
None
-
Moderate
-
rhel-pt-pcp
-
1
-
False
-
False
-
-
No
-
None
-
None
-
None
-
Unspecified Release Note Type - Unknown
-
Unspecified
-
Unspecified
-
Unspecified
-
-
All
-
None
pcp2opentelemetry tool generates output that is not compliant with OTLP/protobuf specification. That is causing an issue when such an output is used as an input for other processing, i.e. processing by a receiver of the opentelemetry-collector.
Follows the list of issues, I have found, so far:
Comments encapsulated in json format
Every output of the pcp2opentelemetry tool starts with two lines of comments encapsulated in json format.
# pcp2opentelemetry -s 1 kernel.all.load | head -n 2
{ "//": "Waiting for 1 metrics to be written to stdout:" }
{ "//": "1 samples(s) with 10.0 sec interval ~ 0 sec runtime." }
The generated json is in "pretty format", instead of being on one line
According to OpenTelemetry Protocol File Exporter specification every record (metric) should be one line only. The line separation ('\n') is used to separate different records (metrics) from each other.
Currently the pcp2opentelemetry tool performs formatting of the json output to "pretty format" , where every json object/leaf is on its own line.
Example of the currently generated code:
{
"resourceMetrics": [
{
"resource": {
"attributes": [
{
"key": "domainname",
"value": {
"stringValue": "localdomain"
}
},
{
"key": "groupid",
"value": {
"stringValue": "990"
}
},
{
"key": "hostname",
"value": {
"stringValue": "vm-10-0-185-111.hosted.upshift.rdu2.redhat.com"
}
},
...
while the expected format is:
{ "resourceMetrics": [ { "resource": { "attributes": [ { "key": "domainname", "value": { "stringValue": "localdomain" } }, { "key": "groupid", "value": { "stringValue": "990" } }, { "key": "hostname", "value": { "stringValue": "vm-10-0-185-111.hosted.upshift.rdu2.redhat.com" } },...
Object dataPoints contains a field instance which is not valid field in the dataPoints object
The instance field is not listed as allowed field in the OTLP specification in the DataPoint object.
Using opentelemetry.proto.collector.metrics python parser I am getting the following error message:
Failed to parse dataPoints field: Message type "opentelemetry.proto.metrics.v1.NumberDataPoint" has no field named "instance" at "ExportMetricsServiceRequest.resourceMetrics[0].scopeMetrics[0].metrics[0].gauge.dataPoints[0]".
timeUnixNano has invalid data type
timeUnixNano should be string representation of nanoseconds since the Unix epoch, that means an integer represented as string. Currently the pcp2opentelemetry tool generates this field as float.
- links to