The SDK v4 is not generating a valid payload compared with the one the agent expects.
In SDK v4, each entity can provide a map of common dimensions . Powerdns example:
The problem is that the agent defines this common field as the following data structure:
type Common struct {
Timestamp *int64 `json:"timestamp"`
Interval *int64 `json:"interval.ms"`
Attributes map[string]interface{} `json:"attributes"`
}
Why to change the SDK and not the agent mapping?
SDK v4 payload data is transformed by the agent to a valid structure for the NR telemetry API. The Telemetry api defines the common structure similar to the agent one:
If we want to align the integrations SDK with the telemetry SDK, the commonDimension field should be aligned with the telemetry CommonBlock. The entity common data should be:
Common timestamp and interval will be added but not covered in this issue as they are currently populated by the agent.
Release
Those change should not break current integrations as CommonDimensions should be added with AddCommonDimension. Nonetheless, CommonDimension field is public/exported, thus we should sync with core integrations to assure CommonDimension is not used directly.
Description
The SDK v4 is not generating a valid payload compared with the one the agent expects. In SDK v4, each entity can provide a map of common dimensions . Powerdns example:
The problem is that the agent defines this common field as the following data structure:
Why to change the SDK and not the agent mapping?
SDK v4 payload data is transformed by the agent to a valid structure for the NR telemetry API. The Telemetry api defines the common structure similar to the agent one:
Telemetry expected payload example.
Expected behaviour
If we want to align the integrations SDK with the telemetry SDK, the commonDimension field should be aligned with the telemetry CommonBlock. The entity common data should be:
Common timestamp and interval will be added but not covered in this issue as they are currently populated by the agent.
Release
Those change should not break current integrations as CommonDimensions should be added with AddCommonDimension. Nonetheless, CommonDimension field is public/exported, thus we should sync with core integrations to assure CommonDimension is not used directly.